merge from dev-slice

This commit is contained in:
daanx
2024-03-02 17:36:23 -08:00
15 changed files with 395 additions and 75 deletions

View File

@@ -929,9 +929,13 @@ static bool mi_try_new_handler(bool nothrow) {
#endif
if (h==NULL) {
_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();
}
#else
MI_UNUSED(nothrow);
#endif
return false;
}
else {