[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - i18npool/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 6 16:11:54 UTC 2020
i18npool/source/collator/gencoll_rule.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f120af264412caf1f3e7446981070ee8da9a076b
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue May 5 18:58:32 2020 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Wed May 6 18:11:24 2020 +0200
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 at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index 88b8b50ea423..2056008d475c 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++) {
More information about the Libreoffice-commits
mailing list