[tlbuild] New ICU tests fail on aarch64-linux (on Debian 10)

Johannes Hielscher jhielscher at posteo.de
Tue Aug 24 15:12:58 CEST 2021


> No. The related code is the ICU library ucol_openRules() in sort.c.
> I have not touched the procedures since v0.50 (Jan 2016), TL r39638.
> For your reference, XeTeX and bibtexu do not use ucol_openRules().

Ahh, I see. It seems that ucol_openRules() doesn't like something
within the rules string, so I suspect that there is something weird
going on in the sort.c function unescape(). I have no experience with
how the rules that ICU ucol_openRules expects are intended to be
formatted like, so I can be only of limited help here.

Just so much: Just like you on Ubuntu, I was initially unable to
reproduce the same error on x86_64-linux (Manjaro) with `-O2` CFLAGS,
but with `-O0 -g` I got the same error here too. Apparently compiler
optimisation magic that interferes with a heisenbug. Might come in
handy to provoke the error for you too.

What I could do is to compare the content of the rules string as
created by unescape(). There *is* a difference:

$ xxd rules-O2.x86_64-linux.works
00000000: 2661 3c3c 3c41 3c43 3c3c c387 3c3c 633c  &a<<<A<C<<..<<c<
00000010: 3cc3 a73c 753c 3c55 3c3c c3bc 3c3c c39c  <..<u<<U<<..<<..
00000020: 3c62 3c3c 420a                           <b<<B.
$ xxd rules-O0.x86_64-linux.fails
00000000: 5026 613c 3c3c 413c 433c 3cc3 873c 3c63  P&a<<<A<C<<..<<c
00000010: 3c3c c3a7 3c75 3c3c 553c 3cc3 bc3c 3cc3  <<..<u<<U<<..<<.
00000020: 9c3c 623c 3c42 0a                        .<b<<B.
$ xxd rules-O0.aarch64-linux.fails
00000000: 0826 613c 3c3c 413c 433c 3cc3 873c 3c63  .&a<<<A<C<<..<<c
00000010: 3c3c c3a7 3c75 3c3c 553c 3cc3 bc3c 3cc3  <<..<u<<U<<..<<.
00000020: 9c3c 623c 3c42 0a                        .<b<<B.

Note the one extra byte at the beginning. Smells like the reason why
ucol_openRules() complains. And what is in this byte, appears
platform-dependent, or worse. Uninitialised variable? Index out of
bounds? But why is the *length* compiler dependent?

HTH


More information about the tlbuild mailing list.