From 3d41006a0e17d57fef4324c2a49c778f7a4a3390 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Sun, 11 Jan 2015 16:48:20 +0100 Subject: hipe: improve error handling at code allocation failure --- erts/emulator/hipe/hipe_ppc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/emulator/hipe/hipe_ppc.c') 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); -- cgit v1.2.3