aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_ppc.c
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2015-01-30 10:15:04 +0100
committerMarcus Arendt <[email protected]>2015-01-30 10:15:04 +0100
commit3051ca1fa0d27adee5abbccce10351a07ab7daa1 (patch)
tree42967108495d63a9056cf948c31e623de1c0e76d /erts/emulator/hipe/hipe_ppc.c
parente4a8ab7530d340249c09ca7f27b0120f55b8354a (diff)
parent3d41006a0e17d57fef4324c2a49c778f7a4a3390 (diff)
downloadotp-3051ca1fa0d27adee5abbccce10351a07ab7daa1.tar.gz
otp-3051ca1fa0d27adee5abbccce10351a07ab7daa1.tar.bz2
otp-3051ca1fa0d27adee5abbccce10351a07ab7daa1.zip
Merge branch 'mikpe/hipe-code-alloc-fixes'
* mikpe/hipe-code-alloc-fixes: hipe: improve error handling at code allocation failure hipe: remove two obsolete BIFs hipe: remove HIPE_ALLOC_CODE macro
Diffstat (limited to 'erts/emulator/hipe/hipe_ppc.c')
-rw-r--r--erts/emulator/hipe/hipe_ppc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_ppc.c b/erts/emulator/hipe/hipe_ppc.c
index 4dc26cdbc8..1eaa9f6855 100644
--- a/erts/emulator/hipe/hipe_ppc.c
+++ b/erts/emulator/hipe/hipe_ppc.c
@@ -293,6 +293,8 @@ void *hipe_make_native_stub(void *callee_exp, unsigned int beamArity)
abort();
code = alloc_stub(7);
+ if (!code)
+ return NULL;
/* addis r12,0,callee_exp@highest */
code[0] = 0x3d800000 | (((unsigned long)callee_exp >> 48) & 0xffff);
@@ -381,6 +383,8 @@ void *hipe_make_native_stub(void *callee_exp, unsigned int beamArity)
abort();
code = alloc_stub(4);
+ if (!code)
+ return NULL;
/* addi r12,0,callee_exp@l */
code[0] = 0x39800000 | ((unsigned long)callee_exp & 0xFFFF);