Comment #24 on issue 28749 by [email protected]: gcc 4.4-specific renderer crash in malloc, memory corruption while loading plugins (?) http://code.google.com/p/chromium/issues/detail?id=28749
So adding -fno-strict-aliasing to my test program in comment #22, solves the problem when used with -O2. Also using -Wstrict-aliasing=2 actually warns about the problem but -Wall (which includes -Wstrict-aliasing=3) doesn't warn at all. Here's the warning: In file included from test.cc:10: base/lazy_instance.h: In member function ‘Type* base::LazyInstance<Type, Traits>::Pointer() [with Type = std::stack<myscoped_refptr<PluginChannelBase>, std::deque<myscoped_refptr<PluginChannelBase>, std::allocator<myscoped_refptr<PluginChannelBase> > > >, Traits = base::DefaultLazyInstanceTraits<std::stack<myscoped_refptr<PluginChannelBase>, std::deque<myscoped_refptr<PluginChannelBase>, std::allocator<myscoped_refptr<PluginChannelBase> > > > >]’: test.cc:130: instantiated from here base/lazy_instance.h:98: warning: dereferencing type-punned pointer will break strict-aliasing rules I'll confirm later of course that this works for chromium too, not just my reduced test case. So there are a couple of options here: 1. Be paranoid and use no_strict_aliasing=1 in case other users of lazy_instance are similarly afflicted 2. Fiddle with the code as in http://codereview.chromium.org/506072 which seems to resolve the problem too 3. Compile libplugin with -fno-strict-aliasing and hope that other users of lazy_instance are actually ok. We can do this automatically based on gcc_version of course. Preferences? I'm actually leaning towards option 2. I see there's a bunch of new bugs being filed about renderer crashes, probably from the PPA that is running into this now ... will mark those as duplicates later. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs
