diff options
author | Lukas Larsson <[email protected]> | 2014-08-08 11:51:27 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-08-08 11:51:27 +0200 |
commit | 2525622c384b27581c4b4cb158fc951f15ac5ca3 (patch) | |
tree | 15c62ac68a08fe211e5663212e0d8fbdbed0d8f2 /erts/emulator/beam/utils.c | |
parent | bf4d615f04002aebca4e340f9fa0aaf3888e84e2 (diff) | |
parent | ad57501215fc02a39abf3fbce978dbc43d010859 (diff) | |
download | otp-2525622c384b27581c4b4cb158fc951f15ac5ca3.tar.gz otp-2525622c384b27581c4b4cb158fc951f15ac5ca3.tar.bz2 otp-2525622c384b27581c4b4cb158fc951f15ac5ca3.zip |
Merge branch 'lukas/erts/malloc_failure_errors/OTP-12085' into maint
* lukas/erts/malloc_failure_errors/OTP-12085:
erts: Print error reason when malloc fails
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index 72092ec7b0..55f9e68e78 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -3948,6 +3948,9 @@ erts_save_emu_args(int argc, char **argv) size += sz+1; } ptr = (char *) malloc(size); + if (!ptr) { + ERTS_INTERNAL_ERROR("malloc failed to allocate memory!"); + } #ifdef DEBUG end_ptr = ptr + size; #endif |