aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_bif_list.m4
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-02-25 15:27:59 +0100
committerSverker Eriksson <[email protected]>2014-02-25 15:27:59 +0100
commitb9440a0529bea5ccc3f4341db29ddda6f4b7c536 (patch)
treefbd7e7c946eb9621fe1f923d04f857b921bd8378 /erts/emulator/hipe/hipe_bif_list.m4
parent98776a40609d1fa80292d2959708a8697f8cb756 (diff)
parenteb53a3f0b7a7d6c4d0a877fe71bc0b0ca11d1597 (diff)
downloadotp-b9440a0529bea5ccc3f4341db29ddda6f4b7c536.tar.gz
otp-b9440a0529bea5ccc3f4341db29ddda6f4b7c536.tar.bz2
otp-b9440a0529bea5ccc3f4341db29ddda6f4b7c536.zip
Merge branch 'sverk/hipe-disable-gc-bug'
* sverk/hipe-disable-gc-bug: erts: Fix heap overwrite by hipe "trap frames" when GC is disabled ASSERT that GC is not tried with "need" when GC is disabled
Diffstat (limited to 'erts/emulator/hipe/hipe_bif_list.m4')
-rw-r--r--erts/emulator/hipe/hipe_bif_list.m414
1 files changed, 12 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_bif_list.m4 b/erts/emulator/hipe/hipe_bif_list.m4
index b1fedf4838..0997d81b2f 100644
--- a/erts/emulator/hipe/hipe_bif_list.m4
+++ b/erts/emulator/hipe/hipe_bif_list.m4
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2004-2012. All Rights Reserved.
+ * Copyright Ericsson AB 2004-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -262,7 +262,17 @@ noproc_primop_interface_1(nbif_atomic_inc, hipe_atomic_inc)
* Standard BIFs.
* BIF_LIST(ModuleAtom,FunctionAtom,Arity,CFun,Index)
*/
-define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, $4)')
+
+/* BIFs that disable GC while trapping are called via a wrapper
+ * to reserve stack space for the "trap frame".
+ */
+define(CFUN,`ifelse($1,term_to_binary_1,hipe_wrapper_term_to_binary_1,
+ifelse($1,term_to_binary_2,hipe_wrapper_term_to_binary_2,
+ifelse($1,erts_internal_binary_to_term_1,hipe_wrapper_erts_internal_binary_to_term_1,
+ifelse($1,erts_internal_binary_to_term_2,hipe_wrapper_erts_internal_binary_to_term_2,
+$1))))')
+
+define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, CFUN($4))')
include(TARGET/`erl_bif_list.h')
/*