aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/external.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-10-16 16:28:21 +0200
committerSverker Eriksson <[email protected]>2013-11-18 20:19:51 +0100
commitd5b6c6f0bd96108d788cdfb9be15059125b3d87f (patch)
tree738c1ba0806110f3f4161a2366cf06592ed2eb25 /erts/emulator/beam/external.c
parentf10ea68ce28e9b93ce614b5f829b1ca7f4cc753f (diff)
downloadotp-d5b6c6f0bd96108d788cdfb9be15059125b3d87f.tar.gz
otp-d5b6c6f0bd96108d788cdfb9be15059125b3d87f.tar.bz2
otp-d5b6c6f0bd96108d788cdfb9be15059125b3d87f.zip
erts: Add erlang wrappers to binary_to_term
to not expose the trapping BIF in the stacktrace when it throws badarg.
Diffstat (limited to 'erts/emulator/beam/external.c')
-rw-r--r--erts/emulator/beam/external.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index 0d2de1b199..e3e199b198 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -1476,7 +1476,7 @@ static Eterm binary_to_term_int(Process* p, Uint32 flags, Eterm bin, Binary* con
erts_set_gc_state(p, 1);
}
BUMP_REDS(p, (initial_reds - ctx->reds) / B2T_BYTES_PER_REDUCTION);
- BIF_ERROR(p, BADARG);
+ BIF_ERROR(p, BADARG & ~EXF_SAVETRACE);
case B2TDone:
b2t_destroy_context(ctx);
@@ -1522,7 +1522,7 @@ static Eterm binary_to_term_int(Process* p, Uint32 flags, Eterm bin, Binary* con
BIF_TRAP1(&binary_to_term_trap_export, p, ctx->trap_bin);
}
-BIF_RETTYPE binary_to_term_1(BIF_ALIST_1)
+BIF_RETTYPE erts_internal_binary_to_term_1(BIF_ALIST_1)
{
/*SVERK if (++sverk_cnt % 1000 == 0) {
erts_fprintf(stderr, "Call #%u to binary_to_term_int()\n", sverk_cnt);
@@ -1534,7 +1534,7 @@ BIF_RETTYPE binary_to_term_1(BIF_ALIST_1)
return binary_to_term_int(BIF_P, 0, BIF_ARG_1, NULL);
}
-BIF_RETTYPE binary_to_term_2(BIF_ALIST_2)
+BIF_RETTYPE erts_internal_binary_to_term_2(BIF_ALIST_2)
{
Eterm opts;
Eterm opt;