This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/54173] New: -D_GLIBCXX_DEBUG breaks string::_Rep::_S_empty_rep_storage weak binding.


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

             Bug #: 54173
           Summary: -D_GLIBCXX_DEBUG breaks
                    string::_Rep::_S_empty_rep_storage weak binding.
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pluto@agmk.net


Created attachment 27937
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27937
testcase

hi,
afaics, the libstdc++ debug machinery breaks some (at least static weak)
symbols binding which causes various runtime problems.

here's the testcase:

/* good */

$ LANG=C make
g++ -Wall l.cpp -fPIC -shared -o l.so -g0 -s -O1 -Wl,--version-script=l.lds
-std=gnu++11
readelf -sW l.so | grep storage
    10: 0000000000000000     0 OBJECT  UNIQUE DEFAULT  UND
_ZNSs4_Rep20_S_empty_rep_storageE@GLIBCXX_3.4 (2)

/* bad */

$ LANG=C make CPPFLAGS=-D_GLIBCXX_DEBUG
g++ -Wall l.cpp -fPIC -shared -o l.so -g0 -s -O1 -Wl,--version-script=l.lds
-std=gnu++11 -D_GLIBCXX_DEBUG
readelf -sW l.so | grep storage
make: *** [all] Error 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]