Summary: | -fvisibility=hidden and stl -> SEGV in __gnu_cxx::__pool<true>::_M_reclaim_block | ||
---|---|---|---|
Product: | gcc | Reporter: | Caolan McNamara <caolanm> |
Component: | libstdc++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | gcc-bugs, jakub |
Priority: | P2 | ||
Version: | 4.0.1 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: | example to reproduce |
Description
Caolan McNamara
2005-07-14 11:41:52 UTC
Created attachment 9268 [details]
example to reproduce
A couple of quick comments: in the report, you are not saying that your gcc-4.0.1 is *not* default configured (i.e., the default is the new-based allocator); also -fvisibility is known to have *lots* of issues, irrespective of allocators (e.g., grep the mailing lists for some trenchant comments general considerations from Roger Sayle). IMHO either we want to just force what must have default visibility to have the default visibility (in mt_allocator.h case it is _S_get_pool), as in: --- ext/mt_allocator.h 2005-05-20 03:36:29.000000000 +0200 +++ ext/mt_allocator.h 2005-07-14 17:17:49.000000000 +0200 @@ -413,7 +413,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __common_pool_policy<_PoolTp1, _Thread1> other; }; - static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { static pool_type _S_pool; @@ -444,7 +444,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __common_pool_policy<_PoolTp1, _Thread1> other; }; - static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { static pool_type _S_pool; @@ -490,7 +490,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __per_type_pool_policy<_Tp1, _PoolTp1, _Thread1> other; }; - static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { // Sane defaults for the _PoolTp. @@ -536,7 +536,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __per_type_pool_policy<_Tp1, _PoolTp1, _Thread1> other; }; - static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { // Sane defaults for the _PoolTp. (of course together with a libstdc++-v3/configure check for visibility attribute and using a macro for that, __gxx_default_visibility or something like that). Not sure what other places in libstdc++-v3 headers rely on having the default visibility. Alternatively, we claim that all of libstdc++-v3 header stuff (or most of it) needs default visibility and add #pragma GCC visibility push(default) ... #pragma GCC visibility pop markers around (most of) libstdc++-v3 headers, like it has been already added for libsupc++ headers. This wasn't possible earlier when we had the 16 GCC visibility pragmas stacking limit, but now that it is gone, we can fix that up. Of course the issues Roger raised need to be solved as well. After reading comment #3, this is in fact a dup of bug 19664. *** This bug has been marked as a duplicate of 19664 *** |