Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-994

SIGSEGV in 23.list.cons --trace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.0, 4.2.1
    • 4.2.2
    • Tests
    • None
    • gcc, Linux/x86_64

    • Patch Available
    • Runtime Error

    Description

      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.

      $  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)
      

      Attachments

        1. stdcxx-994.patch
          51 kB
          Farid Zaripov

        Issue Links

          Activity

            People

              farid Farid Zaripov
              sebor Martin Sebor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h Original Estimate - 4h
                  4h
                  Remaining:
                  Time Spent - 4h Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - 4h Remaining Estimate - 2h
                  4h