stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-994) SIGSEGV in 23.list.cons --trace
Date Wed, 16 Jul 2008 19:25:31 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614069#action_12614069
] 

Martin Sebor commented on STDCXX-994:
-------------------------------------

Here's a small test case. Looks like we've got the order of arguments to the %\{X=*} directive
reversed...
{noformat}
$ cat t.cpp && make t && gdb -q t
#include <rw_value.h>
#include <rw_printf.h>

int main ()
{
    UserClass x;

    rw_printf ("%{X=*}\n", 4, 0, &x);
}
gcc -c -I/home/sebor/stdcxx-4.2.0/include/ansi -D_RWSTDDEBUG   -pthread -I/home/
sebor/stdcxx-4.2.0/include -I/build/sebor/stdcxx-4.2.0-gcc-4.1.2-15d/include -I/
home/sebor/stdcxx-4.2.0/tests/include  -pedantic -nostdinc++ -g  -W -Wall -Wcast
-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align   t.cpp
gcc t.o -o t -L/build/sebor/stdcxx-4.2.0-gcc-4.1.2-15d/rwtest -lrwtest15d -pthre
ad -L/build/sebor/stdcxx-4.2.0-gcc-4.1.2-15d/lib  -Wl,-R/build/sebor/stdcxx-4.2.
0-gcc-4.1.2-15d/lib:/build/sebor/stdcxx-4.2.0-gcc-4.1.2-15d/rwtest -lstd15d -lsu
pc++ -lm 
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run
Starting program: /build/sebor/stdcxx-4.2.0-gcc-4.1.2-15d/tests/t 
[Thread debugging using libthread_db enabled]
[New Thread 46912499614528 (LWP 8786)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912499614528 (LWP 8786)]
0x00000000004133bb in _rw_fmtxarrayv (pbuf=0x7fff2d79c8f8, 
    pbufsize=0x7fff2d79c8f0, fmt=0x7fff2d79c6d3 "", va=0x7fff2d79b790)
    at /home/sebor/stdcxx-4.2.0/tests/src/value.cpp:826
826                               px == pelem);                   // '<'
Missing separate debuginfos, use: debuginfo-install gcc.x86_64
(gdb) where
#0  0x00000000004133bb in _rw_fmtxarrayv (pbuf=0x7fff2d79c8f8, 
    pbufsize=0x7fff2d79c8f0, fmt=0x7fff2d79c6d3 "", va=0x7fff2d79b790)
    at /home/sebor/stdcxx-4.2.0/tests/src/value.cpp:826
#1  0x000000000041363a in _rw_fmtxarray (pbuf=0x7fff2d79c8f8, 
    pbufsize=0x7fff2d79c8f0, fmt=0x7fff2d79c6d0 "X=*")
    at /home/sebor/stdcxx-4.2.0/tests/src/value.cpp:854
#2  0x000000000040a6a6 in _rw_vasnprintf_ext (pspec=0x7fff2d79bdd0, paramno=0, 
    buf=@0x7fff2d79c830, fmt=0x7fff2d79c6d0 "X=*", pva=0x7fff2d79c860)
    at /home/sebor/stdcxx-4.2.0/tests/src/printf.cpp:2551
#3  0x000000000040863a in _rw_pvasnprintf (buf=@0x7fff2d79c830, 
    fmt=0x4199f0 "%{X=*}\n", pva=0x7fff2d79c860)
    at /home/sebor/stdcxx-4.2.0/tests/src/printf.cpp:810
#4  0x0000000000408f24 in rw_vasnprintf (pbuf=0x7fff2d79c8f8, 
    pbufsize=0x7fff2d79c8f0, fmt=0x4199f0 "%{X=*}\n", varg=0x7fff2d79c930)
    at /home/sebor/stdcxx-4.2.0/tests/src/printf.cpp:1013
#5  0x000000000040906b in _rw_vfprintf (file=0x317cf51760, 
    fmt=0x4199f0 "%{X=*}\n", va=0x7fff2d79c930)
    at /home/sebor/stdcxx-4.2.0/tests/src/printf.cpp:3395
#6  0x000000000040919f in rw_printf (fmt=0x4199f0 "%{X=*}\n")
    at /home/sebor/stdcxx-4.2.0/tests/src/printf.cpp:3462
#7  0x0000000000402657 in main () at t.cpp:8
(gdb) l
821                               px == pelem,                    // '>'
822                               fl_pound, px->id_,              // "<id>:"
823                               fl_plus, px->data_.val_,        // <val>
824                               px + 1 < xbeg + nelems,         // ','
825                               px->data_.val_,                 // <val>
826                               px == pelem);                   // '<'
827             if (n < 0)
828                 return n;
829
830             nbytes += n;
(gdb) p px
$1 = (const UserClass *) 0x0
(gdb) p xbeg
$2 = (const UserClass * const) 0x0
(gdb) p nelems
$3 = 4
(gdb)
{noformat}

> SIGSEGV in 23.list.cons --trace
> -------------------------------
>
>                 Key: STDCXX-994
>                 URL: https://issues.apache.org/jira/browse/STDCXX-994
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.2.0, 4.2.1
>         Environment: gcc, Linux/x86_64
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>             Fix For: 4.2.2
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Running the {{23.list.cons}} test with the {{--trace}} option on the command line abends
with {{SIGSEGV}} with the stack trace below. The same happens with 4.2.0, 4.2.1, 4.2.x and
4.3.x, and with gcc 4.1 as well as gcc 4.3.
> {noformat}
> $  gdb -q 23.list.cons 
> Using host libthread_db library "/lib64/libthread_db.so.1".
> (gdb) run --trace
> Starting program: /build/sebor/stdcxx-4.2.1-gcc-4.3.0-15d/tests/23.list.cons --trace
> [Thread debugging using libthread_db enabled]
> # INFO (S1) (10 lines):
> # TEXT: 
> # COMPILER: gcc 4.3.0, __VERSION__ = "4.3.0"
> # ENVIRONMENT: x86_64/LP64 running linux-elf (Fedora release 8 (Werewolf)) with glibc
2.7
> # FILE: 23.list.cons.cpp
> # COMPILED: May  7 2008, 14:06:41
> # COMMENT: 
> ############################################################
> # CLAUSE: lib.list.cons
> # ITRACE_NOTE (S0) (5 lines):
> # TEXT: std::list<UserPOD>::list() tests disabled
> # CLAUSE: lib.list.cons
> # FILE: 23.containers.cpp
> # LINE: 1040
> # INFO (S1) (3 lines):
> # TEXT: std::list<UserPOD>::list()
> # CLAUSE: lib.list.cons
> [New Thread 46912501818272 (LWP 8153)]
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 46912501818272 (LWP 8153)]
> 0x0000000000449a55 in _rw_fmtxarrayv (pbuf=0x7fffef954da8, 
>     pbufsize=0x7fffef954c58, fmt=0x7fffef954ac3 "", va=0x7fffef953b90)
>     at /home/sebor/stdcxx-4.2.1/tests/src/value.cpp:834
> 834                               px == pelem);                   // '<'
> (gdb) where
> #0  0x0000000000449a55 in _rw_fmtxarrayv (pbuf=0x7fffef954da8, 
>     pbufsize=0x7fffef954c58, fmt=0x7fffef954ac3 "", va=0x7fffef953b90)
>     at /home/sebor/stdcxx-4.2.1/tests/src/value.cpp:834
> #1  0x0000000000449cb1 in _rw_fmtxarray (pbuf=0x7fffef954da8, 
>     pbufsize=0x7fffef954c58, fmt=0x7fffef954ac0 "X=*")
>     at /home/sebor/stdcxx-4.2.1/tests/src/value.cpp:862
> #2  0x000000000043fd00 in _rw_vasnprintf_ext (pspec=0x7fffef9541c0, paramno=2, 
>     buf=@0x7fffef954c10, fmt=0x7fffef954ac0 "X=*", pva=0x7fffef954c40)
>     at /home/sebor/stdcxx-4.2.1/tests/src/printf.cpp:2503
> #3  0x000000000043eb86 in _rw_pvasnprintf (buf=@0x7fffef954c10, 
>     fmt=0x44f42c " expected \"%{X=*}\", got null", pva=0x7fffef954c40)
>     at /home/sebor/stdcxx-4.2.1/tests/src/printf.cpp:809
> #4  0x00000000004435ce in rw_vasnprintf (pbuf=0x7fffef954da8, 
>     pbufsize=0x7fffef954c58, 
>     fmt=0x44f418 "line %d. %{$FUNCALL} expected \"%{X=*}\", got null", 
>     varg=0x7fffef954e90) at /home/sebor/stdcxx-4.2.1/tests/src/printf.cpp:1013
> #5  0x0000000000433550 in _rw_vissue_diag (diag=diag_assert, severity=0, 
>     file=0x0, line=65, 
>     fmt=0x44f418 "line %d. %{$FUNCALL} expected \"%{X=*}\", got null", 
>     va=0x7fffef954e90) at /home/sebor/stdcxx-4.2.1/tests/src/driver.cpp:1262
> #6  0x0000000000433bda in _rw_vdiag (diag=diag_assert, severity=0, file=0x0, 
>     line=65, 
>     fmt=0x44f418 "line %d. %{$FUNCALL} expected \"%{X=*}\", got null", 
>     va=0x7fffef954e90) at /home/sebor/stdcxx-4.2.1/tests/src/driver.cpp:1446
> #7  0x000000000043406d in rw_assert (success=1, file=0x0, line=65, 
>     fmt=0x44f418 "line %d. %{$FUNCALL} expected \"%{X=*}\", got null")
>     at /home/sebor/stdcxx-4.2.1/tests/src/driver.cpp:1499
> #8  0x000000000042a5b5 in test_cons<UserPOD, std::allocator<UserPOD> > (
>     rng=@0x6873a8, tdata=@0x7fffef9552b0)
>     at /home/sebor/stdcxx-4.2.1/tests/containers/23.list.cons.cpp:538
> #9  0x000000000042b322 in test_cons<UserPOD, std::allocator<UserPOD> > (
>     tdata=@0x7fffef9552b0)
>     at /home/sebor/stdcxx-4.2.1/tests/containers/23.list.cons.cpp:952
> #10 0x000000000042db20 in _rw_dispatch<UserPOD, std::allocator<UserPOD> >
(
>     farray=0x44f5c0, func=@0x7fffef9554c0, tcase=@0x467f40)
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:900
> #11 0x000000000042dea4 in _rw_dispatch<UserPOD> (farray=0x44f5c0, 
>     func=@0x7fffef9554c0, tcase=@0x467f40)
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:913
> #12 0x000000000042bf81 in _rw_dispatch (farray=0x44f5c0, func=@0x7fffef9554c0, 
>     tcase=@0x467f40)
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:931
> #13 0x000000000042d146 in _rw_test_case (func=@0x7fffef9554c0, 
>     tcase=@0x467f40, test_callback=0, farray=0x44f5c0)
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:1001
> #14 0x000000000042d26e in _rw_run_cases (func=@0x7fffef9554c0, test=@0x44f5e0)
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:1056
> #15 0x000000000042d4e2 in _rw_run_test ()
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:1191
> #16 0x00000000004346d7 in rw_vtest (argc=2, argv=0x7fffef955c88, 
>     file_name=0x44f168 "/home/sebor/stdcxx-4.2.1/tests/containers/23.list.cons.cpp",
clause=0x44f158 "lib.list.cons", comment=0x0, 
>     fun=0x42d27f <_rw_run_test>, 
>     optstr=0x689410 "|-no-exceptions# |-no-exception-safety# |-self-ref~ |-UserPOD~ |-UserClass~
|-allocator~ |-UserAlloc~ |-InputIterator~ |-ForwardIterator~ |-BidirectionalIterator~ |-RandomAccessIterator~
|-pointer~ |-"..., 
>     va=0x7fffef9557c0) at /home/sebor/stdcxx-4.2.1/tests/src/driver.cpp:1056
> #17 0x0000000000434b80 in rw_test (argc=2, argv=0x7fffef955c88, 
>     fname=0x44f168 "/home/sebor/stdcxx-4.2.1/tests/containers/23.list.cons.cpp", clause=0x44f158
"lib.list.cons", comment=0x0, 
>     testfun=0x42d27f <_rw_run_test>, 
>     optstr=0x689410 "|-no-exceptions# |-no-exception-safety# |-self-ref~ |-UserPOD~ |-UserClass~
|-allocator~ |-UserAlloc~ |-InputIterator~ |-ForwardIterator~ |-BidirectionalIterator~ |-RandomAccessIterator~
|-pointer~ |-"...)
>     at /home/sebor/stdcxx-4.2.1/tests/src/driver.cpp:1154
> #18 0x000000000042c8c4 in _rw_run_test (argc=2, argv=0x7fffef955c88, 
>     file=0x44f168 "/home/sebor/stdcxx-4.2.1/tests/containers/23.list.cons.cpp", clause=0x44f158
"lib.list.cons", container=ContainerIds::List, 
>     test_callback=0, func_array=0x44f5c0, tests=0x44f5e0, test_count=9)
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:1348
> #19 0x000000000042c938 in rw_run_cont_test (argc=2, argv=0x7fffef955c88, 
>     file=0x44f168 "/home/sebor/stdcxx-4.2.1/tests/containers/23.list.cons.cpp", clause=0x44f158
"lib.list.cons", container=ContainerIds::List, 
>     farray=0x44f5c0, tests=0x44f5e0, count=9)
>     at /home/sebor/stdcxx-4.2.1/tests/src/23.containers.cpp:1384
> #20 0x00000000004034c5 in main (argc=2, argv=0x7fffef955c88)
>     at /home/sebor/stdcxx-4.2.1/tests/containers/23.list.cons.cpp:998
> (gdb)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message