From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12454 invoked by alias); 21 Jun 2006 04:50:56 -0000 Received: (qmail 12384 invoked by uid 48); 21 Jun 2006 04:50:48 -0000 Date: Wed, 21 Jun 2006 05:05:00 -0000 Message-ID: <20060621045048.12383.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/28017] lack of guard variables for explicitly instantiated template static data In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg01935.txt.bz2 List-Id: ------- 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