Bug 49037 - SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of global static
Summary: SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of glob...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.6.0
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 06:38 UTC by Craig Southeren
Modified: 2011-05-18 11:30 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.5.2, 4.6.0
Last reconfirmed: 2011-05-18 09:27:49


Attachments
preprocessed file (66.08 KB, application/octet-stream)
2011-05-18 06:38 UTC, Craig Southeren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Southeren 2011-05-18 06:38:43 UTC
Created attachment 24275 [details]
preprocessed file

A SEGV is generated if __gnu_cxx::bitmap_allocator is used within the constructor of a global static. 

This does not occur for gcc versions prior to gcc 4.4.0 (approximately), and does not occur if the same code is used with the std::allocator or __gnu_cxx::__mt_alloc allocators.

Host system: (uname -a)
Linux shogun.erina.postincrement.net 2.6.32.16-150.fc12.x86_64 #1 SMP Sat Jul 24 05:19:12 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

g++ version is compiled from release tarball, no patches

g++ (GCC) 4.6.0
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

t.ii file is attached
Comment 1 Richard Biener 2011-05-18 09:27:49 UTC
Confirmed.
Comment 2 Paolo Carlini 2011-05-18 10:09:53 UTC
Really, nobody is going to spend time on bitmap_allocator. If you ask me, I would be in favor of removing it completely.
Comment 3 Jonathan Wakely 2011-05-18 10:31:46 UTC
The static data members aren't initialized before they're first used and I don't see an easy way to fix it.

I agree with Paolo. At the very least we should mark it _GLIBCXX_DEPRECATED
Comment 4 Paolo Carlini 2011-05-18 11:30:15 UTC
Jon, if you want to send to the mailing list the deprecation bits, just to make sure we are all on the same page on this, it would be great. Really, I never really liked this code, and I don't see who is going to spend time on it in the foreseeable future.