http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48818
--- Comment #2 from Melanie Cappelaere <melaniec at enfocus dot com> 2011-05-04 14:19:01 UTC --- Created attachment 24181 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24181 Example with custom allocator Thank you for the workaround. Little side note: this bug also applies to stl containers using a custom allocator that happens to have the same name and occurs in both the application and the library. Allocation is done using the library's allocator, but deallocation is done using the application's. (The workaround also works in this case.)