summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-05-05 18:58:32 +0300
committerAndras Timar <andras.timar@collabora.com>2020-05-08 12:07:30 +0200
commit8eebe39d8d7da9fa64c798bdfce420d1d989782e (patch)
tree837c25d2f833d649dbd829c92ff2e7c30a6fe3ef /i18npool
parentb4e4a5ca8ed52a57d39b06ae7183fd4586e980eb (diff)
ICU requires that a collator charset data array is four-byte-aligned
See workdir/UnpackedTarball/icu/source/common/utrie2.cpp, the U_POINTER_MASK_LSB() check: if( length<=0 || (U_POINTER_MASK_LSB(data, 3)!=0) || valueBits<0 || UTRIE2_COUNT_VALUE_BITS<=valueBits ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } Apparently the data pointer there is always a multiple of four bytes from the start of the data array that the gencoll_rule code generates. Change-Id: I9b98b01b49b5800e1db8b077a4221b82d59510bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93507 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93603 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93647
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/collator/gencoll_rule.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index 33be2a5a2c56..d0c54d6637f1 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -50,7 +50,7 @@ static void data_write(char* file, char* name, sal_uInt8 *data, sal_Int32 len)
fprintf(fp, "\nextern \"C\" {\n");
// generate main dict. data array
- fprintf(fp, "\nstatic const sal_uInt8 %s[] = {", name);
+ fprintf(fp, "\nalignas(4) static const sal_uInt8 %s[] = {", name);
sal_Int32 count = 0;
for (sal_Int32 i = 0; i < len; i++) {