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 c++/28017] lack of guard variables for explicitly instantiated template static data



------- Comment #11 from pinskia at gcc dot gnu dot org  2006-06-21 04:50 -------
Actually I take that back, it is also a problem with targets that don't have
weak symbols too.
On x86_64-linux-gnu with the additional flag of -fno-weak:
pc64:~> g++ test.cc test1.cc -fno-weak
pc64:~> ./a.out
new: mString has value 0x502010
new: mString has value 0x502030
delete: mString has value 0x502030
delete: mString has value 0x502030
*** glibc detected *** double free or corruption (fasttop): 0x0000000000502030
***
Abort

So the new part of the test should be just shrunk back to testing
DECL_EXPLICIT_INSTANTIATION instead of the other parts too.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|*-darwin                    |non weak
   Target Milestone|---                         |4.0.4


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


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