[ https://issues.apache.org/jira/browse/STDCXX-806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor updated STDCXX-806: -------------------------------- Fix Version/s: (was: 4.2.1) 4.2.2 Deferred until 4.2.2. > [FreeBSD] SIGSEGV in 0.printf because of __rw::__rw_memattr > ----------------------------------------------------------- > > Key: STDCXX-806 > URL: https://issues.apache.org/jira/browse/STDCXX-806 > Project: C++ Standard Library > Issue Type: Bug > Components: Tests > Affects Versions: 4.2.0 > Environment: $ uname -spr && gcc --version > FreeBSD 6.2-RELEASE i386 > gcc (GCC) 3.4.6 [FreeBSD] 20060305 > Reporter: Martin Sebor > Assignee: Martin Sebor > Priority: Minor > Fix For: 4.2.2 > > Original Estimate: 2h > Remaining Estimate: 2h > > The test [0.printf.cpp|http://svn.apache.org/repos/asf/stdcxx/trunk/tests/self/0.printf.cpp] exits with a SIGSEGV on FreeBSD due to what's most likely a bug in the {{\_\_rw::__rw_memattr()}} function. This was a problem in stdcxx 4.2.0 and still is a problem on the head of trunk today. The stack trace is below: > {noformat} > $ LD_LIBRARY_PATH=../lib gdb ./0.printf > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "i386-marcel-freebsd"... > (gdb) run > Starting program: /build/sebor/stdcxx-gcc-3.4.6-15d/tests/0.printf > warning: Unable to get location for thread creation breakpoint: generic error > [New LWP 100149] > "%": percent sign > "%c": character formatting > extension: "%{c}": escaped character > extension: "%{#c}": quoted escaped character > "%lc": wide character > extension: "%{lc}": escaped wide character > extension: "%{#lc}": quoted escaped wide character > "%s": character string > [New Thread 0x8093000 (LWP 100149)] > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x8093000 (LWP 100149)] > 0x282b0340 in memchr () from /lib/libc.so.6 > (gdb) where > #0 0x282b0340 in memchr () from /lib/libc.so.6 > #1 0x2810b00a in __rw::__rw_memattr (addr=0x20, nbytes=4294967295, attr=-1) > at /.amd/albatross/san/devco/sebor/stdcxx/src/memattr.cpp:223 > #2 0x080755ad in _rw_fmtstr (spec=@0xbfbfe5b0, buf=@0xbfbfeb10, > str=0x20 , len=4294967295) > at /.amd/albatross/san/devco/sebor/stdcxx/tests/src/printf.cpp:2331 > #3 0x08071786 in _rw_vasnprintf_c99 (pspec=0xbfbfe5b0, paramno=0, > buf=@0xbfbfeb10, pva=0xbfbfeaf8) > at /.amd/albatross/san/devco/sebor/stdcxx/tests/src/printf.cpp:594 > #4 0x0807232e in _rw_pvasnprintf (buf=@0xbfbfeb10, fmt=0x807e2ac "%s", > pva=0xbfbfeaf8) > at /.amd/albatross/san/devco/sebor/stdcxx/tests/src/printf.cpp:898 > #5 0x080726e7 in rw_vasnprintf (pbuf=0xbfbfeb64, pbufsize=0xbfbfeb60, > fmt=0x807e2ac "%s", varg=0xbfbfeb74 " ") > at /.amd/albatross/san/devco/sebor/stdcxx/tests/src/printf.cpp:1011 > #6 0x08078025 in rw_sprintfa (fmt=0x807e2ac "%s") > at /.amd/albatross/san/devco/sebor/stdcxx/tests/src/printf.cpp:3272 > #7 0x0804d97e in test_string () > at /.amd/albatross/san/devco/sebor/stdcxx/tests/self/0.printf.cpp:419 > #8 0x0807061f in main () > at /.amd/albatross/san/devco/sebor/stdcxx/tests/self/0.printf.cpp:3287 > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.