Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11204: undefined behavior sanitizer complains about runtime_error thrown in serialization/singleton.hpp before main()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-13 15:21:07
#11204: undefined behavior sanitizer complains about runtime_error thrown in
serialization/singleton.hpp before main()
--------------------------------------+---------------------------
Reporter: Georg Sauthoff <mail@â¦> | Owner: ramey
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: serialization
Version: Boost Development Trunk | Severity: Problem
Resolution: invalid | Keywords:
--------------------------------------+---------------------------
Comment (by anonymous):
I think what he means is this:
https://github.com/boostorg/serialization/commit/4f83fc163afad8fc078afcb0eccfbda1f161b3b6
{{{
private:
BOOST_DLLEXPORT static T & instance;
// include this to provoke instantiation at pre-execution time
- static void use(T const &) {}
+ static void use(T const *) {}
BOOST_DLLEXPORT static T & get_instance() {
static detail::singleton_wrapper< T > t;
// refer to instance, causing it to be instantiated (and
// initialized at startup on working compilers)
BOOST_ASSERT(! detail::singleton_wrapper< T >::m_is_destroyed);
- use(instance);
+ use(& instance);
return static_cast<T &>(t);
}
public:
}}}
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:
{{{
==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<tt::InstanceValueKey,
tt::InstanceValue>::void_caster_primitive()
(/build/debug/cpp/libotdscpp.so+0x4acd4cf)
#1 0x7fca1b1275e6 in
boost_1_57_0::serialization::detail::singleton_wrapper<boost_1_57_0::serialization::void_cast_detail::void_caster_primitive<tt::InstanceValueKey,
tt::InstanceValue> >::singleton_wrapper()
lib/boost/install/include/boost/serialization/singleton.hpp:106
#2 0x7fca1b1276f1 in
boost_1_57_0::serialization::singleton<boost_1_57_0::serialization::void_cast_detail::void_caster_primitive<tt::InstanceValueKey,
tt::InstanceValue> >::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)
...
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11204#comment:5> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC