This commit is contained in:
Jarred Sumner 2025-04-04 01:24:20 +08:00 committed by GitHub
commit 253915b896
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194

View file

@ -465,7 +465,11 @@ static bool mi_try_new_handler(bool nothrow) {
_mi_error_message(ENOMEM, "out of memory in 'new'");
#if defined(_CPPUNWIND) || defined(__cpp_exceptions) // exceptions are not always enabled
if (!nothrow) {
throw std::bad_alloc();
#if defined(__GNUC__) && !defined(__EXCEPTIONS)
abort();
#else
throw std::bad_alloc();
#endif
}
#else
MI_UNUSED(nothrow);