File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -802,7 +802,10 @@ static bool mi_try_new_handler(bool nothrow) {
802802 std ::set_new_handler (h );
803803 #endif
804804 if (h == NULL ) {
805- if (!nothrow ) throw std ::bad_alloc ();
805+ _mi_error_message (ENOMEM , "out of memory in 'new'" );
806+ if (!nothrow ) {
807+ throw std ::bad_alloc ();
808+ }
806809 return false;
807810 }
808811 else {
@@ -830,9 +833,9 @@ static std_new_handler_t mi_get_new_handler() {
830833static bool mi_try_new_handler (bool nothrow ) {
831834 std_new_handler_t h = mi_get_new_handler ();
832835 if (h == NULL ) {
836+ _mi_error_message (ENOMEM , "out of memory in 'new'" );
833837 if (!nothrow ) {
834- _mi_error_message (EFAULT , "out of memory in 'new' call" ); // cannot throw in plain C, use EFAULT to abort
835- abort ();
838+ abort (); // cannot throw in plain C, use abort
836839 }
837840 return false;
838841 }
You can’t perform that action at this time.
0 commit comments