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

[Intel C++ 10.0.025/Linux] SIGABRT in 21.string.cons due to uncaught exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.2.1
    • 4.2.2
    • Tests
    • None
    • Intel C++ 10.0.025
      Red Hat Enterprise Linux Server release 5 (Tikanga)

    • Incorrect Behavior

    Description

      When compiled with Intel C++ 10.0 on Linux, regardless of the build type, the test 21.string.cons.cpp abends with SIGABRT. The stack trace suggests than a thrown exception isn't being caught. This doesn't seem to be a problem on Windows or when using Intel C++ 9.1. Suspect a compiler bug.

      $ nice make 21.string.cons CXXOPTS=-g && gdb -q 21.string.cons
      icc -cxxlib-nostd -g   -w1 -g -I/amd/devco/sebor/stdcxx/include/ansi -D_RWSTDDEBUG   -pthread -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-icc-10.0.025-15D/include -I/amd/devco/sebor/stdcxx/tests/include  -L/build/sebor/stdcxx-icc-10.0.025-15D/rwtest -lrwtest15D -cxxlib-nostd  -pthread  -L/build/sebor/stdcxx-icc-10.0.025-15D/lib  -Wl,-R/build/sebor/stdcxx-icc-10.0.025-15D/lib:/build/sebor/stdcxx-icc-10.0.025-15D/rwtest  /amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp /build/sebor/stdcxx-icc-10.0.025-15D/lib/libstd15D.so /build/sebor/stdcxx-icc-10.0.025-15D/rwtest/librwtest15D.a  -lstd15D -lcxaguard -lsupc++ -lm -o 21.string.cons
      Using host libthread_db library "/lib64/libthread_db.so.1".
      (gdb) run -q
      Starting program: /build/sebor/stdcxx-icc-10.0.025-15D/tests/21.string.cons -q
      [Thread debugging using libthread_db enabled]
      [New Thread 46912509492864 (LWP 2627)]
      terminate called after throwing an instance of 'std::out_of_range'
        what():  /amd/devco/sebor/stdcxx/include/string.cc:129: std::basic_string<_CharT, _Traits, _Allocator>::basic_string(const std::basic_string<_CharT, _Traits, _Allocator> &, _Allocator::size_type, _Allocator::size_type, const _Allocator &) [with _CharT = char, _Traits = std::char_traits<char>, _Allocator = UserAlloc<char, AllocTypes<char>>]: argument value 5 out of range [0, 3)
      
      Program received signal SIGABRT, Aborted.
      [Switching to Thread 46912509492864 (LWP 2627)]
      0x0000003dfb430015 in raise () from /lib64/libc.so.6
      (gdb) where
      #0  0x0000003dfb430015 in raise () from /lib64/libc.so.6
      #1  0x0000003dfb431980 in abort () from /lib64/libc.so.6
      #2  0x00002aaaaab942a4 in __gnu_cxx::__verbose_terminate_handler ()
          at ../../../../libstdc++-v3/libsupc++/vterminate.cc:97
      #3  0x00002aaaaab94026 in __cxxabiv1::__terminate (handler=0xa43)
          at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:43
      #4  0x00002aaaaab95083 in std::terminate ()
          at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:53
      #5  0x00002aaaaab9561a in __cxa_throw (obj=<value optimized out>, 
          tinfo=<value optimized out>, dest=<value optimized out>)
          at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:77
      #6  0x00002aaaaab643cd in __rw::__rw_throw_exception (id=9, 
          what=0x1ea518f0 "/amd/devco/sebor/stdcxx/include/string.cc:129: std::basic_string<_CharT, _Traits, _Allocator>::basic_string(const std::basic_string<_CharT, _Traits, _Allocator> &, _Allocator::size_type, _Allocator::s"...)
          at /amd/devco/sebor/stdcxx/src/exception.cpp:714
      #7  0x00002aaaaab64df1 in __rw::__rw_throw (id=9)
          at /amd/devco/sebor/stdcxx/src/exception.cpp:854
      #8  0x00000000004a1c80 in _ZNSbIcSt11char_traitsIcE9UserAllocIc10AllocTypesIcEEEC9ERKS5_mmRKS4_ (this=0x1ea50c40, __s=@0x7fff4b7475f0, __pos=5, 
          __n=18446744073709551615, __alloc=@0x7fff4b747580)
          at /amd/devco/sebor/stdcxx/include/string.cc:129
      #9  0x00000000004a12b0 in std::basic_string<char, std::char_traits<char>, UserAlloc<char, AllocTypes<char> > >::basic_string (this=0x1ea50c40)
          at /amd/devco/sebor/stdcxx/include/string.cc:65536
      #10 0x00000000004228e7 in test_cons<char, std::char_traits<char>, UserAlloc<char, AllocTypes<char> > > (rng=@0x7885f0, tdata=@0x7fff4b747b90)
          at /amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp:690
      #11 0x0000000000421e2e in test_cons<char, std::char_traits<char>, UserAlloc<char, AllocTypes<char> > > (tdata=@0x7fff4b747b90)
          at /amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp:1095
      #12 0x0000000000411460 in _rw_dispatch<char, std::char_traits<char>, UserAlloc<char, AllocTypes<char> > > (farray=0x537bc0, func=@0x7fff4b7481f0, 
          tcase=@0x5357b0) at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1169
      #13 0x00000000004114fd in _rw_dispatch<char, std::char_traits<char> > (
          farray=0x537bc0, func=@0x7fff4b7481f0, tcase=@0x5357b0)
          at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1186
      #14 0x00000000004110cd in _rw_dispatch<char> (farray=0x537bc0, 
          func=@0x7fff4b7481f0, tcase=@0x5357b0)
          at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1203
      #15 0x00000000004e8aa4 in _rw_dispatch (farray=0x537bc0, func=@0x7fff4b7481f0, 
          tcase=@0x5357b0) at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1222
      #16 0x00000000004e8d43 in _rw_test_case (func=@0x7fff4b7481f0, 
          tcase=@0x5357b0, test_callback=0, farray=0x537bc0)
          at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1301
      #17 0x00000000004e8ea3 in _rw_run_cases (func=@0x7fff4b7481f0, test=@0x537e00)
          at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1353
      #18 0x00000000004e93e3 in _rw_run_test ()
          at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1522
      #19 0x00000000004ee7dc in rw_vtest (argc=2, argv=0x7fff4b748a68, 
          file_name=0x532844 "/amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp", clause=0x537d78 "lib.string.cons", comment=0x0, 
          fun=0x4e8f50 <_rw_run_test(int, char**)>, 
          optstr=0x1ea3e350 "|-no-exceptions# |-no-exception-safety# |-self-ref~ |-char~ |-wchar_t~ |-UserChar~ |-char_traits~ |-UserTraits~ |-allocator~ |-UserAlloc~ |-InputIterator~ |-ForwardIterator~ |-BidirectionalIterator~ |"..., 
          va=0x7fff4b748600) at /amd/devco/sebor/stdcxx/tests/src/driver.cpp:1040
      #20 0x00000000004eed34 in rw_test (argc=2, argv=0x7fff4b748a68, 
          fname=0x532844 "/amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp", 
          clause=0x537d78 "lib.string.cons", comment=0x0, 
          testfun=0x4e8f50 <_rw_run_test(int, char**)>, 
          optstr=0x1ea3e350 "|-no-exceptions# |-no-exception-safety# |-self-ref~ |-char~ |-wchar_t~ |-UserChar~ |-char_traits~ |-UserTraits~ |-allocator~ |-UserAlloc~ |-InputIterator~ |-ForwardIterator~ |-BidirectionalIterator~ |"...)
          at /amd/devco/sebor/stdcxx/tests/src/driver.cpp:1138
      #21 0x00000000004e9919 in _rw_run_test (argc=2, argv=0x7fff4b748a68, 
          file=0x532844 "/amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp", 
          clause=0x537d78 "lib.string.cons", test_callback=0, func_array=0x537bc0, 
          tests=0x537da0, test_count=11)
          at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1598
      #22 0x00000000004e9a21 in rw_run_string_test (argc=2, argv=0x7fff4b748a68, 
          file=0x532844 "/amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp", 
          clause=0x537d78 "lib.string.cons", farray=0x537bc0, tests=0x537da0, 
          count=11) at /amd/devco/sebor/stdcxx/tests/src/21.strings.cpp:1711
      #23 0x00000000004e589e in main (argc=2, argv=0x7fff4b748a68)
          at /amd/devco/sebor/stdcxx/tests/strings/21.string.cons.cpp:1139
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified