Re: [Boost-bugs] [Boost C++ Libraries] #11204: undefined behavior sanitizer complains about runtime_error thrown in serialization/singleton.hpp before main()

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: 2015-05-24 00:06:51


#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:
--------------------------------------+---------------------------
Changes (by ramey):

 * status: new => closed
 * resolution: => invalid

Comment:

 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

 {{{
 use(instance);
 }}}

 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11204#comment:2>
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:18 UTC