public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60731] New: dynamic library not getting reinitialized on multiple calls to dlopen()
@ 2014-04-01 17:01 tim.moloney at mrsl dot com
  2014-04-02  9:00 ` [Bug c++/60731] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: tim.moloney at mrsl dot com @ 2014-04-01 17:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60731

            Bug ID: 60731
           Summary: dynamic library not getting reinitialized on multiple
                    calls to dlopen()
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tim.moloney at mrsl dot com

Created attachment 32518
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32518&action=edit
Example showing failure to initialize a dynamic library after multiple calls to
dlopen().

If a dynamic library is loaded multiple times via dlopen(), subsequent loads do
not correctly initialize static variables under the following conditions:
1) A class/struct with a constructor
2) with an inlined function
3) containing a static variable.
Please run the attached example.
  # tar xf gcc_static_issue.tgz
  # cd gcc_static_issue
  # make
  # ./test_static
  Expected behavior (as on RHEL5, g++ 4.1.2):
  Type 'q' to exit or enter to reload/run the DLL
  count:1

  count:1

  count:1

  count:1

  count:1
  q
  #
Actual behavior (as on RHEL6 and RHEL7beta, g++ 4.4.7 and 4.8.2, respectively):
  Type 'q' to exit or enter to reload/run the DLL
  count:1

  count:2

  count:3

  count:4

  count:5
  q
  #


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-01-15 15:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 17:01 [Bug c++/60731] New: dynamic library not getting reinitialized on multiple calls to dlopen() tim.moloney at mrsl dot com
2014-04-02  9:00 ` [Bug c++/60731] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-04-02  9:49 ` rguenth at gcc dot gnu.org
2014-04-02 18:30 ` jason at gcc dot gnu.org
2014-04-03  9:48 ` rguenth at gcc dot gnu.org
2014-04-03 11:32 ` rguenth at gcc dot gnu.org
2014-04-07 13:28 ` jason at gcc dot gnu.org
2014-04-07 13:28 ` jason at gcc dot gnu.org
2014-04-23  9:09 ` neleai at seznam dot cz
2014-05-05 16:04 ` jason at gcc dot gnu.org
2014-06-13 16:19 ` jason at gcc dot gnu.org
2014-06-13 16:40 ` jason at gcc dot gnu.org
2015-01-15 15:03 ` davejohansen at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).