Re: [Boost-bugs] [Boost C++ Libraries] #8414: flyweights causes weird library initialization error

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8414: flyweights causes weird library initialization error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-07 18:09:00


#8414: flyweights causes weird library initialization error
-----------------------------------------------------------+----------------
  Reporter: charles quarra <charlls_quarra@…> | Owner: joaquin
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: flyweight
   Version: Boost 1.53.0 | Severity: Showstopper
Resolution: invalid | Keywords:
-----------------------------------------------------------+----------------
Changes (by joaquin):

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

Comment:

 Hi Charles,

 I've been examing the scenario and these are my conclusions (which lead me
 to think this is not a bug in Boost.Flyweight, hence I'm closing the
 ticket, please feel free to reopen if in disagreement):

 You're checking the succesfull closing of the dynamic library incorrectly:

 {{{
     if (dlclose(foo) < 0) {
         ...
     }
 }}}

 when it should be

 {{{
     if (dlclose(foo) != 0) {
         ...
     }
 }}}

 My thesis is then that `dlclose` is then failing to close the dynamic lib
 because, according to the Linux documentation on the command, some other
 module is sharing some symbol with it. I think the shared symbol is
 `getEmptyStringSymbol` and the sharing module is 'libpluginTest.so' again,
 which, additionally to its being loaded dynamically, it's also linked at
 build time:

 `g++ -I/path/to/boost/includes -fPIC -shared -rdynamic test_plugin.cpp`
 **`-o libpluginTest.so`** `-L/path/to/boost/libs -lrt`

 My take is that if you omit `-o libpluginTest.so` everything will behave
 as you expect.

 Best regards,

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8414#comment:1>
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:12 UTC