https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535

            Bug ID: 64535
           Summary: Emergency buffer for exception allocation too small
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org

It was reported to us that in a heavily threaded environment the number of
emergency EH objects in libsubc++ eh_alloc.cc is too small (64).  To mitigate
this it looks like we could use a TLS variable for the buffer instead
(libstdc++ already contains TLS variables for __once_call at least), which
also would get rid of the scoped lock (which hopefully will never allocate
memory...?).

If you use exceptions to catch and recover from low-memory situations
__cxa_allocate_exception calling std::terminate () becomes a correctness
issue (not sure what the C++ standard says about throwing exceptions
in low-memory situations).

Reply via email to