aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_amd64_bifs.m4
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2016-04-12 15:26:07 +0200
committerMagnus Lång <[email protected]>2016-06-30 12:30:04 +0200
commit520654d49d9f1c1548dc2a5800c7330001cd3064 (patch)
tree0e72981d83f8f9404d9dec71504b8a1d92282d1e /erts/emulator/hipe/hipe_amd64_bifs.m4
parent1dd81185dfb2fd6ac30b6eb44c905128c8958cb4 (diff)
downloadotp-520654d49d9f1c1548dc2a5800c7330001cd3064.tar.gz
otp-520654d49d9f1c1548dc2a5800c7330001cd3064.tar.bz2
otp-520654d49d9f1c1548dc2a5800c7330001cd3064.zip
hipe: Fix bug in trap frame allocation wrappers
The trap frame allocation wrappers occasionally call the garbage collector, even though built-in functions are not supposed to. On non-{x86,amd64} platforms, HiPE was optimising the BIF wrapper interface on the basis that BIFs do not GC. So, when hipe_reserve_beam_trap_frame called the garbage collector, the state in the PCB was stale and corruption happened. Now, these particular BIFs are reclassified as GC BIFs. Unfortunately, in order to do that we needed to introduce a gc_bif_interface_3 macro in every hipe_$ARCH_bifs.m4 file.
Diffstat (limited to 'erts/emulator/hipe/hipe_amd64_bifs.m4')
-rw-r--r--erts/emulator/hipe/hipe_amd64_bifs.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/hipe/hipe_amd64_bifs.m4 b/erts/emulator/hipe/hipe_amd64_bifs.m4
index 9cf3bf74fd..21739726bb 100644
--- a/erts/emulator/hipe/hipe_amd64_bifs.m4
+++ b/erts/emulator/hipe/hipe_amd64_bifs.m4
@@ -600,10 +600,11 @@ noproc_primop_interface_0(nbif_handle_fp_exception, erts_restore_fpu)
define(gc_bif_interface_0,`nofail_primop_interface_0($1, $2)')
/*
- * Implement gc_bif_interface_N as standard_bif_interface_N (N=1,2).
+ * Implement gc_bif_interface_N as standard_bif_interface_N (N=1,2,3).
*/
define(gc_bif_interface_1,`standard_bif_interface_1($1, $2)')
define(gc_bif_interface_2,`standard_bif_interface_2($1, $2)')
+define(gc_bif_interface_3,`standard_bif_interface_3($1, $2)')
/*
* Implement gc_nofail_primop_interface_1 as nofail_primop_interface_1.