Menu

#108 locale test failures

cppcms-v1.0.x
closed
None
1
2015-02-16
2013-10-24
ari
No

cppcms version: 1.0.4

System information:

>>> uname -srm
Linux 3.10.15-gentoo x86_64

>>> gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-cloog --without-ppl --disable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --with-multilib-list=m32,m64 --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/python --enable-checking=release --disable-libgcj --enable-libstdcxx-time --enable-objc-gc --enable-languages=c,c++,objc,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.7.3-r1 p1.3, pie-0.5.5'
Thread model: posix
gcc version 4.7.3 (Gentoo 4.7.3-r1 p1.3, pie-0.5.5) 

>>> eix -c -I boost
[I] dev-libs/boost (1.53.0@09/12/2013): Boost Libraries for C++
[I] dev-util/boost-build (1.53.0@07/15/2013): A system for large project software construction, which is simple to use and powerful.
Found 2 matches.

Details:

>>> mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..
[output in attached file]

>>> make -j4 && make test

[...]
      Start 85: test_locale_boundary
85/93 Test #85: test_locale_boundary ....................***Exception: SegFault  0.01 sec
      Start 86: test_locale_formatting
86/93 Test #86: test_locale_formatting ..................***Failed    0.05 sec
[...]

98% tests passed, 2 tests failed out of 93

Total Test time (real) = 282.11 sec

The following tests FAILED:
         85 - test_locale_boundary (SEGFAULT)
         86 - test_locale_formatting (Failed)
Errors while running CTest
make: *** [test] Error 8

>>> gdb booster/test_locale_boundary 
GNU gdb (Gentoo 7.6 p1) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /tmp/build/cppcms-1.0.4/build/booster/test_locale_boundary...done.
(gdb) r
Starting program: /tmp/build/cppcms-1.0.4/build/booster/test_locale_boundary 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Testing segment operators
Testing word boundary
 char UTF-8
Error in line:104 p->str()==chunks[i]
Error in line:105 p->rule() == unsigned(masks[i])
Error in line:104 p->str()==chunks[i]
Error in line:105 p->rule() == unsigned(masks[i])
Error in line:103 i < chunks.size()

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff525cb73 in std::string::size (this=0x67ac88)
    at /var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:713
713     /var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h: No such file or directory.
(gdb) bt
#0  0x00007ffff525cb73 in std::string::size (this=0x67ac88)
    at /var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:713
#1  0x00000000004370d4 in std::operator==<char> (__lhs="が", 
    __rhs=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4/bits/basic_string.h:2494
#2  0x000000000043800e in test_word_container<char, std::_List_iterator<char> > (begin=49 '1', end=56 '8', 
    ipos=std::vector of length 9, capacity 16 = {...}, imasks=std::vector of length 9, capacity 16 = {...}, 
    ichunks=std::vector of length 9, capacity 16 = {...}, l=..., bt=booster::locale::boundary::word)
    at /tmp/build/cppcms-1.0.4/booster/lib/locale/test/test_boundary.cpp:104
#3  0x0000000000436512 in run_word<char> (original=0x7fffffffccc0, none=0x7fffffffcb90, num=0x7fffffffcbc0, 
    word=0x7fffffffcbf0, kana=0x7fffffffcc20, ideo=0x7fffffffcc50, l=..., b=booster::locale::boundary::word)
    at /tmp/build/cppcms-1.0.4/booster/lib/locale/test/test_boundary.cpp:359
#4  0x0000000000431341 in word_boundary () at /tmp/build/cppcms-1.0.4/booster/lib/locale/test/test_boundary.cpp:415
#5  0x0000000000435080 in main () at /tmp/build/cppcms-1.0.4/booster/lib/locale/test/test_boundary.cpp:514
(gdb) up
#1  0x00000000004370d4 in std::operator==<char> (__lhs="が", 
    __rhs=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4/bits/basic_string.h:2494
2494                                                        __lhs.size())); }
(gdb) up
#2  0x000000000043800e in test_word_container<char, std::_List_iterator<char> > (begin=49 '1', end=56 '8', 
    ipos=std::vector of length 9, capacity 16 = {...}, imasks=std::vector of length 9, capacity 16 = {...}, 
    ichunks=std::vector of length 9, capacity 16 = {...}, l=..., bt=booster::locale::boundary::word)
    at /tmp/build/cppcms-1.0.4/booster/lib/locale/test/test_boundary.cpp:104
104                         TEST(p->str()==chunks[i]);
(gdb) print i
$1 = 9
(gdb) print chunks.size()
$2 = 9
(gdb) print p->str()
$3 = "が"
(gdb) print chunks[i]
$4 = <error reading variable: Cannot access memory at address 0xffffffffffffffe8>
2 Attachments

Discussion

  • ari

    ari - 2013-10-24

    booster/test_locale_formatting fails with the following, though I expect that this should go in a different bug report:

    >>> ./booster/test_locale_formatting 
    Testing char, UTF-8
    Error in line:291 (ss.str())==(to_correct_string<CharType>("4:33:13 PM GMT+01:00",loc))
    Error in line:298 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970 3:33:13 PM",loc))
    Error in line:299 (ss.str())==(to_correct_string<CharType>("2/5/70 3:33 PM",loc))
    Error in line:300 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970 3:33:13 PM",loc))
    Error in line:302 (ss.str())==(to_correct_string<CharType>("February 5, 1970 3:33:13 PM GMT",loc))
    Error in line:305 (ss.str())==(to_correct_string<CharType>("Thursday, February 5, 1970 3:33:13 PM GMT",loc))
    Error in line:353 (ss.str())==(to_correct_string<CharType>(result[i],loc))
    Error in line:436 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970;3:33:13 PM;Feb 5, 1970 3:33:13 PM;Feb 5, 1970 3:33:13 PM",loc))
    Error in line:436 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970;3:33:13 PM;Feb 5, 1970 3:33:13 PM;Feb 5, 1970 3:33:13 PM",loc))
    Error in line:436 ((booster::locale::basic_format<CharType>(fmt) % a_datetime).str(loc))==(to_correct_string<CharType>("Feb 5, 1970;3:33:13 PM;Feb 5, 1970 3:33:13 PM;Feb 5, 1970 3:33:13 PM",loc))
    Testing char, ISO8859-1
    Error in line:291 (ss.str())==(to_correct_string<CharType>("4:33:13 PM GMT+01:00",loc))
    Error in line:298 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970 3:33:13 PM",loc))
    Error in line:299 (ss.str())==(to_correct_string<CharType>("2/5/70 3:33 PM",loc))
    Error in line:300 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970 3:33:13 PM",loc))
    Error in line:302 (ss.str())==(to_correct_string<CharType>("February 5, 1970 3:33:13 PM GMT",loc))
    Error in line:305 (ss.str())==(to_correct_string<CharType>("Thursday, February 5, 1970 3:33:13 PM GMT",loc))
    Error in line:353 (ss.str())==(to_correct_string<CharType>(result[i],loc))
    Error in line:436 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970;3:33:13 PM;Feb 5, 1970 3:33:13 PM;Feb 5, 1970 3:33:13 PM",loc))
    Error in line:436 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970;3:33:13 PM;Feb 5, 1970 3:33:13 PM;Feb 5, 1970 3:33:13 PM",loc))
    Error in line:436 ((booster::locale::basic_format<CharType>(fmt) % a_datetime).str(loc))==(to_correct_string<CharType>("Feb 5, 1970;3:33:13 PM;Feb 5, 1970 3:33:13 PM;Feb 5, 1970 3:33:13 PM",loc))
    Testing wchar_t
    Error in line:291 (ss.str())==(to_correct_string<CharType>("4:33:13 PM GMT+01:00",loc))
    Error in line:298 (ss.str())==(to_correct_string<CharType>("Feb 5, 1970 3:33:13 PM",loc))
    Failed Error limits reached, stopping unit test
    
     
  • Anonymous

    Anonymous - 2014-01-05

    Hi,

    could reproduce the issue. Here my system desc:
    Linux 3.12-1-amd64 x86_64

    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Debian 4.8.2-11' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 4.8.2 (Debian 4.8.2-11)

    $ sudo aptitude show cmake
    [...]
    Version : 2.8.12.1-1.1
    [...]
    $ sudo aptitude show libpcre3-dev
    [...]
    Version : 1:8.31-2
    [...]
    $ sudo aptitude show zlib1g-dev
    [...]
    Version : 1:1.2.8.dfsg-1
    [...]
    $ sudo aptitude show libgcrypt11-dev libicu-dev python
    Paquet : libgcrypt11-dev
    [...]
    Version : 1.5.3-3
    [...]
    Paquet : libicu-dev
    [...]
    Version : 52.1-3
    [...]
    Paquet : python
    [...]
    Version : 2.7.5-5
    [...]

     
  • Artyom Beilis

    Artyom Beilis - 2014-08-02
    • status: open --> accepted
    • assigned_to: Artyom Beilis
     
  • Artyom Beilis

    Artyom Beilis - 2014-08-02

    The problem is in ICU >= 50. It has some problem with boundary analysis of Japanese text.

    I have fixed the crash (the test still fails though) about formatting I don't know what is the problem

    the formatting problem - isn't really problem is rather formatting differences introduced in v50 and aboce

     

    Last edit: Artyom Beilis 2014-08-02
  • Artyom Beilis

    Artyom Beilis - 2014-10-13
    • status: accepted --> closed
     
  • Artyom Beilis

    Artyom Beilis - 2014-10-13

    Fixed in cs: 2257, 2258 in v1.0 fixes branch

     

Anonymous
Anonymous

Add attachments
Cancel