[Boost-bugs] [Boost C++ Libraries] #6799: Assert hit in dl-close.c when calling dlclose on libboost_date_time.so

Subject: [Boost-bugs] [Boost C++ Libraries] #6799: Assert hit in dl-close.c when calling dlclose on libboost_date_time.so
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-04-16 12:30:27


#6799: Assert hit in dl-close.c when calling dlclose on libboost_date_time.so
-----------------------------------------------------------+----------------
 Reporter: Christophe Dumez <christophe.dumez@…> | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.48.0 | Severity: Problem
 Keywords: |
-----------------------------------------------------------+----------------
 I get the hit the following assert when calling dlclose() on
 libboost_date_time.so:
 Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion
 `map->l_init_called' failed!

 I wrote a small test library and test app to reproduce the issue.
 1. Compile libchild.so library. It is a library which links against
 libboost_date_time.so but has a missing symbol.
 2. Compile test-dlopen.c and run the app.

 The test-dlopen app will:
 1. Call dlopen("./libchild.so", RTLD_NOW), which will fail because of the
 missing symbol (normal). It will probably recursively load
 libboost_date_time.so since libchild.so links against it.
 2. Call mh = dlopen("/usr/lib/libboost_date_time.so", RTLD_NOW), which
 will succeed (normal).
 3. Call dlclose(mh), which will hit the assert.

 The output of the test app is:
 $ ./test-dlopen
 trying to load ./libchild.so...
 Failed to load: ./libchild.so: undefined symbol: _Z15registerMethodsv
 trying to load /usr/lib/libboost_date_time.so...
 Inconsistency detected by ld.so: dl-close.c: 743: _dl_close: Assertion
 `map->l_init_called' failed!

 I tried with:
 boost v1.48 + glibc 2.13 (Tizen)
 boost v1.47 + glic 2.14.90 (Fedora)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6799>
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:09 UTC