Boost C++ Libraries: Ticket #11204: undefined behavior sanitizer complains about runtime_error thrown in serialization/singleton.hpp before main() https://svn.boost.org/trac10/ticket/11204 <p> How to reproduce: </p> <pre class="wiki">#include &lt;boost/archive/text_iarchive.hpp&gt; #include &lt;boost/archive/text_oarchive.hpp&gt; #include &lt;boost/serialization/vector.hpp&gt; #include &lt;vector&gt; #include &lt;fstream&gt; using namespace std; struct Data { vector&lt;int&gt; v; }; namespace boost { namespace serialization { template&lt;class Archive&gt; void serialize(Archive &amp; a, Data &amp;d, const unsigned int version) { a &amp; d.v; } } } int main(int argc, char **argv) { if (argc &gt; 10) { ifstream f("/dev/null"); boost::archive::text_iarchive a(f); Data d; a &gt;&gt; d; } else { ofstream f("/dev/null"); boost::archive::text_oarchive a(f); Data d; a &lt;&lt; d; } return 0; } </pre><p> Compile via: </p> <pre class="wiki">$ g++ -g -std=c++11 -I/home/juser/src/boost/modular-boost \ -L/home/juser/src/boost/modular-boost/stage/lib \ -Wl,-R/home/juser/src/boost/modular-boost/stage/lib \ -fsanitize=undefined test_serialize.cc \ -o test_serialize -lboost_serialization </pre><p> (GCC's undefined behavior sanitizer is enabled with <code>-fsanitize=undefined</code>) </p> <p> Run: </p> <pre class="wiki">$ ./test_serialize </pre><p> Expected output: </p> <p> (nothing) </p> <p> Actual output: </p> <pre class="wiki">/home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:132:21: runtime error: reference binding to null pointer of type 'const struct extended_type_info_typeid' /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:132:21: runtime error: reference binding to null pointer of type 'const struct iserializer' /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:132:21: runtime error: reference binding to null pointer of type 'const struct oserializer' /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:132:21: runtime error: reference binding to null pointer of type 'const struct extended_type_info_typeid' /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:132:21: runtime error: reference binding to null pointer of type 'const struct oserializer' /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:132:21: runtime error: reference binding to null pointer of type 'const struct iserializer' </pre><p> First backtrace when breaking in singleton.hpp:132: </p> <pre class="wiki">(gdb) bt #0 boost::serialization::singleton&lt;boost::serialization::extended_type_info_typeid&lt;Data&gt; &gt;::get_instance () at /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:132 #1 0x0000000000407ebd in boost::serialization::singleton&lt;boost::serialization::extended_type_info_typeid&lt;Data&gt; &gt;::get_const_instance () at /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:141 #2 0x0000000000407924 in boost::archive::detail::iserializer&lt;boost::archive::text_iarchive, Data&gt;::iserializer ( this=0x640a60 &lt;boost::serialization::singleton&lt;boost::archive::detail::iserializer&lt;boost::archive::text_iarchive, Data&gt; &gt;::get_instance()::t&gt;) at /home/juser/src/boost/modular-boost/boost/archive/detail/iserializer.hpp:128 #3 0x0000000000407373 in boost::serialization::detail::singleton_wrapper&lt;boost::archive::detail::iserializer&lt;boost::archive::text_iarchive, Data&gt; &gt;::singleton_wrapper ( this=0x640a60 &lt;boost::serialization::singleton&lt;boost::archive::detail::iserializer&lt;boost::archive::text_iarchive, Data&gt; &gt;::get_instance()::t&gt;) at /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:106 #4 0x000000000040740b in boost::serialization::singleton&lt;boost::archive::detail::iserializer&lt;boost::archive::text_iarchive, Data&gt; &gt;::get_instance () at /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:128 #5 0x0000000000404a13 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /home/juser/src/boost/modular-boost/boost/serialization/singleton.hpp:149 #6 0x0000000000404c6e in _GLOBAL__sub_I_main () at test_serialize.cc:43 #7 0x000000000041abbd in __libc_csu_init () #8 0x00007ffff62e5f6f in __libc_start_main (main=0x4047c6 &lt;main(int, char**)&gt;, argc=1, argv=0x7fffffffdfb8, init=0x41ab70 &lt;__libc_csu_init&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7fffffffdfa8) at libc-start.c:245 #9 0x00000000004046f9 in _start () </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11204 Trac 1.4.3 Georg Sauthoff <mail@…> Sat, 18 Apr 2015 20:33:07 GMT summary changed https://svn.boost.org/trac10/ticket/11204#comment:1 https://svn.boost.org/trac10/ticket/11204#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">undefined behavior sanitizer complains about serialization/singleton.hpp thrown before main()</span> → <span class="trac-field-new">undefined behavior sanitizer complains about runtime_error thrown in serialization/singleton.hpp before main()</span> </li> </ul> Ticket Robert Ramey Sun, 24 May 2015 00:06:51 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11204#comment:2 https://svn.boost.org/trac10/ticket/11204#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> I wasn't able to get the (address?) sanitizer working in my Xcode 6 environment. But I did trace through the program with the debugger. line 132 of singleton.hpp contains the line </p> <pre class="wiki">use(instance); </pre><p> where the value of instance has the (initialized value of zero). This might be considered an error by the sanitizer, but use(...) is an empty function. It is only included to guarantee that the singleton is called before main. If this isn't included, compile for release may optimize away the pre-main invocation and the class may not function as intended. So I would call this an over zealous behavior of the sanitizer. Or maybe the sanitizer could be considered not smart enough to trace one more level deep. or... what ever. </p> Ticket Robert Ramey Sun, 24 May 2015 16:46:58 GMT <link>https://svn.boost.org/trac10/ticket/11204#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:3</guid> <description> <p> News flash - I think I found and easy fix for this. Right now it's only on my own machine, but I expect to be uploading to Develop branch in the near future. </p> </description> <category>Ticket</category> </item> <item> <author>tm@…</author> <pubDate>Wed, 02 Dec 2015 19:55:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11204#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/11204#comment:3" title="Comment 3">ramey</a>: </p> <blockquote class="citation"> <p> News flash - I think I found and easy fix for this. Right now it's only on my own machine, but I expect to be uploading to Develop branch in the near future. </p> </blockquote> <p> Just a short nudge on this issue as i've tried to build our project with UBSAN and hit the same issue. Do you still have the easy fix and could you upload it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 13 Jan 2016 15:21:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11204#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:5</guid> <description> <p> I think what he means is this: </p> <p> <a class="ext-link" href="https://github.com/boostorg/serialization/commit/4f83fc163afad8fc078afcb0eccfbda1f161b3b6"><span class="icon">​</span>https://github.com/boostorg/serialization/commit/4f83fc163afad8fc078afcb0eccfbda1f161b3b6</a> </p> <pre class="wiki"> private: BOOST_DLLEXPORT static T &amp; instance; // include this to provoke instantiation at pre-execution time - static void use(T const &amp;) {} + static void use(T const *) {} BOOST_DLLEXPORT static T &amp; get_instance() { static detail::singleton_wrapper&lt; T &gt; t; // refer to instance, causing it to be instantiated (and // initialized at startup on working compilers) BOOST_ASSERT(! detail::singleton_wrapper&lt; T &gt;::m_is_destroyed); - use(instance); + use(&amp; instance); return static_cast&lt;T &amp;&gt;(t); } public: </pre><p> Unfortunately, it didn't fix the problem for me, or rather fixed it, but only partially. Now I'm getting another error, along the lines of: </p> <pre class="wiki">==29772==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7fca1b12c4d0 bp 0x7ffcb629d230 sp 0x7ffcb629d200 T0) #0 0x7fca1b12c4cf in boost_1_57_0::serialization::void_cast_detail::void_caster_primitive&lt;tt::InstanceValueKey, tt::InstanceValue&gt;::void_caster_primitive() (/build/debug/cpp/libotdscpp.so+0x4acd4cf) #1 0x7fca1b1275e6 in boost_1_57_0::serialization::detail::singleton_wrapper&lt;boost_1_57_0::serialization::void_cast_detail::void_caster_primitive&lt;tt::InstanceValueKey, tt::InstanceValue&gt; &gt;::singleton_wrapper() lib/boost/install/include/boost/serialization/singleton.hpp:106 #2 0x7fca1b1276f1 in boost_1_57_0::serialization::singleton&lt;boost_1_57_0::serialization::void_cast_detail::void_caster_primitive&lt;tt::InstanceValueKey, tt::InstanceValue&gt; &gt;::get_instance() lib/boost/install/include/boost/serialization/singleton.hpp:128 #3 0x7fca1b1124b4 in __static_initialization_and_destruction_0 lib/boost/install/include/boost/serialization/singleton.hpp:149 #4 0x7fca1b1141c5 in _GLOBAL__sub_I_instancevalue.cc cpp/instancevalue.cc:659 #5 0x7fca28106139 (/lib64/ld-linux-x86-64.so.2+0x10139) #6 0x7fca28106222 (/lib64/ld-linux-x86-64.so.2+0x10222) #7 0x7fca2810ac6f (/lib64/ld-linux-x86-64.so.2+0x14c6f) #8 0x7fca28105ff3 (/lib64/ld-linux-x86-64.so.2+0xfff3) #9 0x7fca2810a3ba (/lib64/ld-linux-x86-64.so.2+0x143ba) #10 0x7fca26d6a02a (/lib/x86_64-linux-gnu/libdl.so.2+0x102a) #11 0x7fca28105ff3 (/lib64/ld-linux-x86-64.so.2+0xfff3) #12 0x7fca26d6a62c (/lib/x86_64-linux-gnu/libdl.so.2+0x162c) #13 0x7fca26d6a0c0 in dlopen (/lib/x86_64-linux-gnu/libdl.so.2+0x10c0) #14 0x7fca271c23ef in dlopen (/usr/lib/gcc/x86_64-linux-gnu/5/libasan.so+0x373ef) ... </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 15 Jan 2016 15:02:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11204#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:6</guid> <description> <p> Apparently, the best way to solve this would be simply to disable instrumentation for this case: </p> <pre class="wiki">#if defined(__clang__) || defined (__GNUC__) # define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) #else # define ATTRIBUTE_NO_SANITIZE_ADDRESS #endif ... ATTRIBUTE_NO_SANITIZE_ADDRESS void ThisFunctionWillNotBeInstrumented() {...} </pre><p> Unfortunately, I wasn't able to find the combination of methods I need to mark so far to make it work :-/ </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 15 Jan 2016 17:44:11 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/11204#comment:7 https://svn.boost.org/trac10/ticket/11204#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> </ul> Ticket anonymous Wed, 27 Jan 2016 14:06:26 GMT <link>https://svn.boost.org/trac10/ticket/11204#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:8</guid> <description> <p> Okay, an update on this ticket: I have finally managed to have another look at it, and here are the conclusions: </p> <p> 1) I was wrong to say that ramey's fix (see <a class="ticket" href="https://svn.boost.org/trac10/ticket/11204#comment:5" title="Comment 5">comment:5</a>) does not resolve the original problem of the reporter (as in the UBSan still complains). </p> <p> It does work indeed for me now on GCC 5.3 with UBSan enabled, it's just that after fixing the reported problem, the program would still crash if ASan is <strong>also</strong> enabled <strong>due to a different problem</strong>. </p> <p> 2) The source of the second problem is in <code>void_caster</code> and it is actually obvious if one attentively reads the backtrace from ASan and the code. </p> <p> ASan doesn't like accesses to unknown addresses: <code>AddressSanitizer: SEGV on unknown address 0x000000000008</code>. This is caused by the constructor called just before the <code>use()</code> function and the following patch makes the problem go away: </p> <pre class="wiki">--- boost/serialization/void_cast.hpp 2016-01-27 14:46:23.000000000 +0100 +++ boost/serialization/void_cast.hpp.orig 2016-01-18 11:50:19.000000000 +0100 @@ -180,7 +180,14 @@ void_caster_primitive&lt;Derived, Base&gt;::void_caster_primitive() : void_caster( &amp; type_info_implementation&lt;Derived&gt;::type::get_const_instance(), - &amp; type_info_implementation&lt;Base&gt;::type::get_const_instance() + &amp; type_info_implementation&lt;Base&gt;::type::get_const_instance(), + // note:I wanted to displace from 0 here, but at least one compiler + // treated 0 by not shifting it at all. + reinterpret_cast&lt;std::ptrdiff_t&gt;( + static_cast&lt;Derived *&gt;( + reinterpret_cast&lt;Base *&gt;(8) + ) + ) - 8 ) { recursive_register(); </pre><p> After seeing this code, I thinks it's quite obvious where the magical <code>0x000000000008</code> comes from... </p> <p> So, having this said, the original problem is indeed solved, and an additional problem is at least diagnosed. Shall we keep this ticket open for this additional problem, or you would rather like to close it and have me open a new ticket for this second issue? </p> <p> Of course, the workaround above works for me right now, but it would be great to have a better solution out of the box. </p> <p> Thanks for your work on <code>boost::serialization</code>! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 22 Aug 2016 11:48:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11204#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:9</guid> <description> <p> I've just checked with clang++-3.9 nightly + ASan, and, unfortunately, <code>void_caster_primitive</code> still causes a SEGV. Is there anything that can be done about it? The comment doesn't specify which compiler specifically was the problematic one and so I'm not sure whether just removing the code for GCC / Clang is "safe". </p> </description> <category>Ticket</category> </item> <item> <dc:creator>davidlt</dc:creator> <pubDate>Wed, 13 Dec 2017 14:57:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11204#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:10</guid> <description> <p> I am using boost 1.63.0, GCC 7.2.1, bintutils 2.29.1 and trying to compile software using boost with Undefined Behavior Sanitizer (UBSan). I think, am hitting the same issue. </p> <p> Compile generates: <code>mov (%r12),%rax </code> and registers are: </p> <pre class="wiki">rax 0x8 8 r12 0x8 8 </pre><p> Here is a full picture: </p> <pre class="wiki"> ┌──/cvmfs/cms-ib.cern.ch/nweek-02500/slc6_amd64_gcc700/external/boost/1.63.0-mmelna2/include/boost/serialization/void_cast.hpp──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │184 // note:I wanted to displace from 0 here, but at least one compiler │ │185 // treated 0 by not shifting it at all. │ │186 reinterpret_cast&lt;std::ptrdiff_t&gt;( │ &gt;│187 static_cast&lt;Derived *&gt;( │ │188 reinterpret_cast&lt;Base *&gt;(8) │ │189 ) │ │190 ) - 8 │ │191 ) │ │192 { │ │193 recursive_register(); │ │194 } │ │195 │ │196 template &lt;class Derived, class Base&gt; │ │197 void_caster_primitive&lt;Derived, Base&gt;::~void_caster_primitive(){ │ │198 recursive_unregister(); │ │199 } │ │200 │ │201 template &lt;class Derived, class Base&gt; │ │202 class BOOST_SYMBOL_VISIBLE void_caster_virtual_base : │ │203 public void_caster │ │204 { │ ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │0x7fffe6c4461c &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+138&gt; mov $0x8,%r12d │ │0x7fffe6c44622 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+144&gt; mov %r12,%rax │ │0x7fffe6c44625 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+147&gt; test %r12,%r12 │ │0x7fffe6c44628 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+150&gt; je 0x7fffe6c44635 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Su│ │0x7fffe6c4462a &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+152&gt; mov %rax,%rdx │ │0x7fffe6c4462d &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+155&gt; and $0x7,%edx │ │0x7fffe6c44630 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+158&gt; test %rdx,%rdx │ │0x7fffe6c44633 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+161&gt; je 0x7fffe6c44644 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Su│ │0x7fffe6c44635 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+163&gt; mov %rax,%rsi │ │0x7fffe6c44638 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+166&gt; lea 0x15f221(%rip),%rdi # 0x7fffe6da3860 │ │0x7fffe6c4463f &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+173&gt; callq 0x7fffe6bd73a0 &lt;__ubsan_handle_type_mismatch@plt&gt; │ &gt;│0x7fffe6c44644 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+178&gt; mov (%r12),%rax │ │0x7fffe6c44648 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+182&gt; mov %rax,%rdx │ │0x7fffe6c4464b &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+185&gt; movabs $0xd36d9746bc2d02eb,%rax │ │0x7fffe6c44655 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+195&gt; xor %rdx,%rax │ │0x7fffe6c44658 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+198&gt; mov %rax,%rcx │ │0x7fffe6c4465b &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+201&gt; movabs $0x9ddfea08eb382d69,%rax │ │0x7fffe6c44665 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+211&gt; imul %rcx,%rax │ │0x7fffe6c44669 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+215&gt; mov %rax,%rcx │ │0x7fffe6c4466c &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+218&gt; shl $0x2f,%rcx │ │0x7fffe6c44670 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+222&gt; xor %rdx,%rax │ └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ multi-thre Thread 0x7ffff7dc97 In: boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive L187 PC: 0x7fffe6c44644 Starting program: /cvmfs/cms-ib.cern.ch/nweek-02500/slc6_amd64_gcc700/cms/cmssw/CMSSW_10_0_UBSAN_X_2017-11-27-2300/external/slc6_amd64_gcc700/bin/python /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc700/cms/cmssw/CMSSW_10_0_UBSAN_X_2017-11-27-2300/src/FWCore/Utilities/scripts /edmCheckClassVersion -l tmp/slc6_amd64_gcc700/src/CondFormats/Common/src/CondFormatsCommon/libCondFormatsCommon.so -x src/CondFormats/Common/src/classes_def.xml [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". warning: File "/cvmfs/cms-ib.cern.ch/nweek-02500/slc6_amd64_gcc700/external/gcc/7.0.0-mmelna2/lib64/libstdc++.so.6.0.24-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". Program received signal SIGSEGV, Segmentation fault. 0x00007fffe6c44644 in boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive ( this=0x7fffe6e18a40 &lt;boost::serialization::singleton&lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt; &gt;::get_instance()::t&gt;) at /cvmfs/cms-ib.cern.ch/nweek-02500/slc6_amd64_gcc700/external/boost/1.63.0-mmelna2/include/boost/serialization/void_cast.hpp:187 (gdb) p $_siginfo._sifields._sigfault.si_addr $1 = (void *) 0x8 (gdb) rax 0x8 8 rbx 0x7fffe6e18a40 140737066928704 rcx 0x14 20 rdx 0x0 0 rsi 0x12 18 rdi 0x7fffe6e18a40 140737066928704 rbp 0x7fffffff2660 0x7fffffff2660 rsp 0x7fffffff2640 0x7fffffff2640 r8 0x24ebc30 38714416 r9 0x6 6 r10 0x7fffffff23f0 140737488298992 r11 0x7fffe6c44592 140737065010578 r12 0x8 8 r13 0x7fffe6d02a98 140737065790104 r14 0x7fffffff3a20 140737488304672 r15 0x0 0 rip 0x7fffe6c44644 0x7fffe6c44644 &lt;boost::serialization::void_cast_detail::void_caster_primitive&lt;cond::GenericSummary, cond::Summary&gt;::void_caster_primitive()+178&gt; eflags 0x10246 [ PF ZF IF RF ] cs 0x33 51 ss 0x2b 43 ds 0x0 0 es 0x0 0 </pre> </description> <category>Ticket</category> </item> <item> <author>matteo@…</author> <pubDate>Sat, 20 Jan 2018 08:49:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11204#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11204#comment:11</guid> <description> <p> I must admit that after trying to fiddle with that function quite a bit, I resorted to just adding <code>__attribute__ ((no_sanitize_undefined))</code> to <code>void_caster_primitive&lt;Derived, Base&gt;::void_caster_primitive()</code>. That shows at least that this in still a current problem. </p> </description> <category>Ticket</category> </item> </channel> </rss>