From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10627 invoked by alias); 2 Apr 2014 09:00:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10572 invoked by uid 48); 2 Apr 2014 09:00:37 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60731] [4.7/4.8/4.9 Regression] dynamic library not getting reinitialized on multiple calls to dlopen() Date: Wed, 02 Apr 2014 09:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cf_known_to_work target_milestone short_desc everconfirmed cf_known_to_fail Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg00127.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60731 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-04-02 Known to work| |4.4.7 Target Milestone|--- |4.7.4 Summary|dynamic library not getting |[4.7/4.8/4.9 Regression] |reinitialized on multiple |dynamic library not getting |calls to dlopen() |reinitialized on multiple | |calls to dlopen() Ever confirmed|0 |1 Known to fail| |4.5.4, 4.8.2, 4.9.0 --- Comment #1 from Richard Biener --- Works up to GCC 4.4, fails since GCC 4.5. It's not clear what makes the difference here. Btw, with LD_DEBUG=all I see 10389: opening file=./static.so [0]; direct_opencount=2 10389: 10389: symbol=routine; lookup in file=./static.so [0] 10389: binding file ./static.so [0] to ./static.so [0]: normal symbol `routine' count:2 10389: opening file=./static.so [0]; direct_opencount=3 10389: 10389: symbol=routine; lookup in file=./static.so [0] 10389: binding file ./static.so [0] to ./static.so [0]: normal symbol `routine' count:3 so the dlclose call does nothing. While in the working case: 10438: 10438: file=./static.so [0]; dynamically loaded by ./test_static [0] 10438: file=./static.so [0]; generating link map 10438: dynamic: 0x00007ffff6ffede0 base: 0x00007ffff6dfd000 size: 0x00000000002020a8 10438: entry: 0x00007ffff6dfdb10 phdr: 0x00007ffff6dfd040 phnum: 7 .... 10438: calling init: ./static.so 10438: 10438: opening file=./static.so [0]; direct_opencount=1 10438: 10438: symbol=routine; lookup in file=./static.so [0] 10438: binding file ./static.so [0] to ./static.so [0]: normal symbol `routine' count:1 10438: 10438: calling fini: ./static.so [0] 10438: 10438: 10438: file=./static.so [0]; destroying link map