the in-progress transition, icu, arm64 and nans

Michael Hudson-Doyle michael.hudson at canonical.com
Fri Nov 23 00:12:36 UTC 2018


Hi,

By my reading, the single thing blocking the migration of a whole bunch of
packages out of disco-proposed is the autopkgtest failure of symfony on
arm64.

Unfortunately, this failure is not a flaky test: it is due to a behaviour
change in ICU.

On disco-proposed:

root at Mcdivitt-B0-Cartridge37:/# cat int64test.c
#include <string.h>
#include <stdio.h>
#include <unicode/unum.h>

int main(int argc, char** argv) {
        UErrorCode status;
        UNumberFormat* nf = unum_open(UNUM_DEFAULT, NULL, -1, NULL, NULL,
&status);
        UChar u_str[1000];
        int32_t length;
        u_strFromUTF8(u_str, 1000, &length, argv[1], strlen(argv[1]),
&status);
        int64_t r = unum_parseInt64(nf, u_str, length, NULL, &status);
        printf("result %ld status %d\n", r, U_FAILURE(status));
}
root at Mcdivitt-B0-Cartridge37:/# gcc -o int64test int64test.c  -licuuc
-licui18n
root at Mcdivitt-B0-Cartridge37:/# ./int64test nan
result 0 status 0

Compiling the same source without proposed enabled:

ubuntu at Mcdivitt-B0-Cartridge37:~$ ./int64test nan
result 0 status 1

FWIW, ./int64test NaN behaves like disco-proposed always (on arm64...), and
symfony has special code handling "NaN", so a reasonable expedient fix is
probably to patch symfony to not be case sensitive there.

Given that this only seems to happen on arm64 and not, say, amd64, my guess
is that it's also an ICU bug but ICU is pretty confusing and documentation
on intended behaviour of how NaN should be handled by number parsing seems
to be non-existent.

Hope this helps someone.

Cheers,
mwh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20181123/029257b8/attachment.html>


More information about the ubuntu-devel mailing list