bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplocale test fails on CentOS 6, and strfmon_l


From: Bruno Haible
Subject: Re: duplocale test fails on CentOS 6, and strfmon_l
Date: Sat, 23 Sep 2017 17:41:06 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-93-generic; KDE/5.18.0; x86_64; ; )

Hello Tom,

> The duplocale test is failling on CentOS 6:
> 
> test-duplocale.c:187: assertion 'strcmp (results.monetary, 
> expected_results.monetary) == 0' failed
> 
> I ran it under gdb to see the values:
> (gdb) run
> Starting program: 
> /home/tgc/projects/gnulib/duplocale/gltests/test-duplocale
> 
> Breakpoint 1, test_with_locale_parameter () at test-duplocale.c:187
> 187         ASSERT (strcmp (results.monetary, expected_results.monetary) == 
> 0);
> Missing separate debuginfos, use: debuginfo-install 
> glibc-2.12-1.209.el6_9.2.x86_64
> (gdb) p results.monetary
> $1 = 
> "$123,75\000\202\254\000\377\377\177\000\000\001\000\000\000\000\000\000\000H\347\377\367\377\177\000\000\177U\335q\000\000\000\000\226V\336\367\377\177",
>  
> '\000' <repeats 11 times>"\336, 
> \377\377\377\177\000\000?\000\000\000\000\000\000\000\000\336\377\377\377\177\000\000\003\000\000\000\063,5\000P\253\377\367\377\177\000\000.N="
> (gdb) p expected_results.monetary
> $2 = 
> "$123.75\000\350\344\377\367\377\177\000\000\320\337\377\377\377\177\000\000\370\337\377\377\377\177\000\000\220\341\377\367\377\177\000\000\230\253\377\367\377\177\000\000.N=\366\000\000\000\000jb\336\367\377\177\000\000\000\000\000\000\000\000\000\000\230\253\377\367\377\177\000\000\001\000\000\000\063,5\000\000\000\000\000\000\000\000\000\001\000\000"
> 
> Ignoring the garbage you can see a comma where the dot was expected.

Thanks for the report. This assertion failure is a combination of
  (1) a bug in the test: it was freeing a locale object that was still in use as
      the current thread's locale,
  (2) glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=19633>
      which produces a dot instead of a comma or vice versa.

I could reproduce (1) as a crash inside nl_langinfo() on glibc/x86 systems
(but not on glibc/x86_64 systems), even on systems with glibc-2.24, where (2)
is already fixed.

And once I fixed (1), I could no longer reproduce the test failure you reported.
But another test program, written specifically for (2), still failed.

So I've committed:
  - for (1): a test fix.
  - for (2): new modules 'monetary' and 'strfmon_l'.

Thanks for this report!

Bruno

Attachment: 0001-duplocale-tests-Fix-test-crash-on-Linux-x86.patch
Description: Text Data

Attachment: 0002-monetary-New-module.patch
Description: Text Data

Attachment: 0003-strfmon_l-New-module.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]