aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-04-22 14:54:00 +0200
committerSverker Eriksson <[email protected]>2015-04-22 14:54:00 +0200
commitb3ad09ba107de16259844fe5bc50898ae40a1a96 (patch)
tree8f89f5510ab3e549c6b029420a0aa502c2415878 /erts/emulator/beam/beam_emu.c
parent67acde7a3522c651982a6789c749aaf73313e913 (diff)
parentdd9ad8da73e15e89c8ab27efdd47a8bda8019957 (diff)
downloadotp-b3ad09ba107de16259844fe5bc50898ae40a1a96.tar.gz
otp-b3ad09ba107de16259844fe5bc50898ae40a1a96.tar.bz2
otp-b3ad09ba107de16259844fe5bc50898ae40a1a96.zip
Merge branch 'sverk/pr632/prevent-illegal-nif-terms/OTP-12655'
* sverk/pr632/prevent-illegal-nif-terms/OTP-12655: erts: Reject non-finite float terms in erl_drv_output_term erts: Remove old docs about experimental NIF versions. erts: Add enif_has_pending_exception erts: Clearify erl_nif documentation about badarg exception erts: Fix compile warning in enif_make_double erts: Fix divide by zero compile error in nif_SUITE.c erts: Fix isfinite for windows Ensure NIF term creation disallows illegal values
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index bb7b799950..fce4fd498a 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -3516,6 +3516,8 @@ do { \
erts_pre_nif(&env, c_p, (struct erl_module_nif*)I[2]);
reg[0] = r(0);
nif_bif_result = (*fp)(&env, bif_nif_arity, reg);
+ if (env.exception_thrown)
+ nif_bif_result = THE_NON_VALUE;
erts_post_nif(&env);
}
ASSERT(!ERTS_PROC_IS_EXITING(c_p) || is_non_value(nif_bif_result));