diff options
author | Mikael Pettersson <[email protected]> | 2015-01-11 16:48:20 +0100 |
---|---|---|
committer | Marcus Arendt <[email protected]> | 2015-01-26 15:57:04 +0100 |
commit | 3d41006a0e17d57fef4324c2a49c778f7a4a3390 (patch) | |
tree | 3bef60849913ccfabfc605a78d542cb955f70154 /erts/emulator/hipe/hipe_arm.c | |
parent | 14d585fdcafad61a377feeba1035d6ddcfaf0248 (diff) | |
download | otp-3d41006a0e17d57fef4324c2a49c778f7a4a3390.tar.gz otp-3d41006a0e17d57fef4324c2a49c778f7a4a3390.tar.bz2 otp-3d41006a0e17d57fef4324c2a49c778f7a4a3390.zip |
hipe: improve error handling at code allocation failure
Diffstat (limited to 'erts/emulator/hipe/hipe_arm.c')
-rw-r--r-- | erts/emulator/hipe/hipe_arm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_arm.c b/erts/emulator/hipe/hipe_arm.c index 165eb543c8..c0c6305c68 100644 --- a/erts/emulator/hipe/hipe_arm.c +++ b/erts/emulator/hipe/hipe_arm.c @@ -283,6 +283,8 @@ void *hipe_make_native_stub(void *callee_exp, unsigned int beamArity) */ code = alloc_stub(4, &tramp_callemu); + if (!code) + return NULL; callemu_offset = ((int)&nbif_callemu - ((int)&code[2] + 8)) >> 2; if (!(callemu_offset >= -0x00800000 && callemu_offset <= 0x007FFFFF)) { callemu_offset = ((int)tramp_callemu - ((int)&code[2] + 8)) >> 2; |