aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_arm.c
diff options
context:
space:
mode:
authorMikael Pettersson <[email protected]>2015-01-11 16:48:20 +0100
committerMarcus Arendt <[email protected]>2015-01-26 15:57:04 +0100
commit3d41006a0e17d57fef4324c2a49c778f7a4a3390 (patch)
tree3bef60849913ccfabfc605a78d542cb955f70154 /erts/emulator/hipe/hipe_arm.c
parent14d585fdcafad61a377feeba1035d6ddcfaf0248 (diff)
downloadotp-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.c2
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;