Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1818

[C++ binding] Complex types: list of nulls causes SIGABRT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • proton-c-0.23.0
    • cpp-binding
    • None

    Description

      The following snippet of code

      std::vector<proton::value> array_2 = {nullptr, nullptr, };
      

      compiles, but when run throws the following core:

      terminate called after throwing an instance of 'std::logic_error'
      what(): basic_string::_M_construct null not valid
      
      Program received signal SIGABRT, Aborted.
      0x00007ffff6f18660 in raise () from /lib64/libc.so.6
      (gdb) bt
      #0 0x00007ffff6f18660 in raise () from /lib64/libc.so.6
      #1 0x00007ffff6f19c41 in abort () from /lib64/libc.so.6
      #2 0x00007ffff788e025 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
      #3 0x00007ffff788bc16 in __cxxabiv1::__terminate(void (*)()) () from /lib64/libstdc++.so.6
      #4 0x00007ffff788bc61 in std::terminate() () from /lib64/libstdc++.so.6
      #5 0x00007ffff788bea4 in __cxa_throw () from /lib64/libstdc++.so.6
      #6 0x00007ffff78b580f in std::__throw_logic_error(char const*) () from /lib64/libstdc++.so.6
      #7 0x00007ffff79242c1 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) ()
      from /lib64/libstdc++.so.6
      #8 0x00007ffff792443f in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /lib64/libstdc++.so.6
      #9 0x00000000004174d7 in proton::codec::operator<< (e=..., s=0x0) at ../install/include/proton/././codec/encoder.hpp:168
      #10 0x00000000004189f7 in proton::value::operator=<decltype(nullptr)>(decltype(nullptr) const&) (this=0x7fffffff9eb0, x=<error reading variable>) at ../install/include/proton/./value.hpp:84
      #11 0x00000000004179e4 in proton::value::value<decltype(nullptr)>(decltype(nullptr) const&, proton::value::assignable<decltype(nullptr), void>::type*) (this=0x7fffffff9eb0, 
      x=<error reading variable>) at ../install/include/proton/./value.hpp:79
      #12 0x000000000040233b in qpidit::amqp_complex_types_test::TestData::initialize () at amqp_complex_types_test.data.cpp:61
      #13 0x0000000000417109 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at amqp_complex_types_test.data.cpp:613
      #14 0x0000000000417125 in _GLOBAL__sub_I__ZN6qpidit23amqp_complex_types_test8TestData10initializeEv () at amqp_complex_types_test.data.cpp:638
      #15 0x000000000041b74d in __libc_csu_init ()
      #16 0x00007ffff6f04ebb in __libc_start_main () from /lib64/libc.so.6
      #17 0x0000000000401fca in _start ()
      

      and where the referenced line amqp_complex_types_test.data.cpp:61 is the snippet shown above.

      Attachments

        Activity

          People

            astitcher Andrew Stitcher
            kpvdr Kim van der Riet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: