https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70690
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > I think the new GCC is correct here and the old one accidentally just got it > "right". > We have: > CentralFreeListPadded Static::central_cache_[kNumClasses]; > > > Which is of type: > class CentralFreeListPadded : public CentralFreeListPaddedTo< > sizeof(CentralFreeList) % 64> > > CentralFreeListPaddedTo is defined as either: > class CentralFreeListPaddedTo : public CentralFreeList > > or > class CentralFreeListPaddedTo<0> : public CentralFreeList > > CentralFreeList has the following constructor: > CentralFreeList() : lock_(base::LINKER_INITIALIZED) { } > > > So it just happened that LINKER_INITIALIZED was also zero: > namespace base { > enum LinkerInitialized { LINKER_INITIALIZED }; > } > > > So this is a bug in tcmalloc as far as I can tell. > > Before the call to the constructor was not done but after it is done. Could you come up with a small testcase?