Boost logo

Boost :

Subject: Re: [boost] "peer reviewed" - Rights and responsibilities of maintainers
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-10-18 10:25:22


On 10/18/18 10:52 AM, Olaf van der Spek via Boost wrote:
> On Wed, Oct 17, 2018 at 9:06 AM, Alexander Grund via Boost
> <boost_at_[hidden]> wrote:
>> b) In the case I described and tested with #111 (and now even with #128)
>> There are 2 shared libraries with their own instances of the singletons
>> (this can be checked by debugging the ctor/dtor of them). The lifetime
>> mismatch happens due to "some linux mechanism" destroying same types from
>> different libraries at the same time invalidating the expectation of each
>> library. Example (actually witnessed by printf-debugging)
>
> Using static libs in shared libs is a recipe for disaster isn't it?
> It's undefined behavior..

No, there's nothing undefined about it, as long as you know what you're
doing. Linking static Boost libraries into shared user's libraries is
actually rather common. It is often done in attempt to conceal Boost
usage or bundle a particular, possibly modified Boost version with the
user's app.

I didn't inspect this particular issue to tell if this specific case is
valid, though.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk