https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106409
--- Comment #6 from Thiago Macieira <thiago at kde dot org> --- Suggestion: add a function to libgcc to be called instead of __cxa_throw_bad_array_new_length when exceptions are disabled. That function can be a mere two instructions, but it provides two advantages: * no need to stream something into LTO * allows post-compilation tools to know what's happened (Valgrind, debuggers, etc.) I don't know if this is an acceptable solution, but I thought I'd make the suggestion.