aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-03-11 08:29:47 +0100
committerBjörn Gustavsson <[email protected]>2011-03-29 07:13:57 +0200
commit9104dc674c265b82728a1b494194fdeea4ad6661 (patch)
treeee4aea92ae075d90901d9676678e40ed7925eddf /erts/emulator/beam
parent459f531d22a16778d528d62978fc0772e30c9d30 (diff)
downloadotp-9104dc674c265b82728a1b494194fdeea4ad6661.tar.gz
otp-9104dc674c265b82728a1b494194fdeea4ad6661.tar.bz2
otp-9104dc674c265b82728a1b494194fdeea4ad6661.zip
Fix duplicate entries in stacktraces after calling certain BIFs
Calling a BIF thaf is called as a function (such as process_info/{1,2}) would leave a non-zero value in c_p->cp, which would lead to duplicate entries in the stacktrace.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/beam_emu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 7b2aac0908..8991f7b198 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -3413,6 +3413,7 @@ void process_main(void)
r(0) = nif_bif_result;
CHECK_TERM(r(0));
SET_I(c_p->cp);
+ c_p->cp = 0;
Goto(*I);
} else if (c_p->freason == TRAP) {
SET_I(*((BeamInstr **) (UWord) ((c_p)->def_arg_reg + 3)));