https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535
--- Comment #26 from rguenther at suse dot de <rguenther at suse dot de> --- On Tue, 27 Jan 2015, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535 > > --- Comment #25 from Jonathan Wakely <redi at gcc dot gnu.org> --- > (In reply to rguent...@suse.de from comment #18) > > But again - where can you catch exceptions thrown from global > > initializers / destructors? > > Within those global constructors/destructors themselves: > > struct Global { > ~Global() { > try { > throw 1; > } catch (...) { > } > } > } global; > > Anyway, we should probably use an init_priority for the pool, because as well > as an order of destruction problem it's possible for a global constructor to > try to use the pool, and that must not happen before it has been initialized > by > the constructor. Of course that's broken in older releases as well because of the emergency_mutex being dynamically constructed.