diff options
author | Sverker Eriksson <[email protected]> | 2016-12-20 18:31:32 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-12-20 18:31:32 +0100 |
commit | 44138faf5c7047af63f49390282358de2e3c3b3d (patch) | |
tree | 5e1d05920e01aca513a1701ced135ed6f847be0f /erts/emulator/beam | |
parent | a3b58a857a9d1a4d4bec051bf7814580e4254f02 (diff) | |
parent | 420aa50e766560c3316a16695c8c3c1c46138aff (diff) | |
download | otp-44138faf5c7047af63f49390282358de2e3c3b3d.tar.gz otp-44138faf5c7047af63f49390282358de2e3c3b3d.tar.bz2 otp-44138faf5c7047af63f49390282358de2e3c3b3d.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 9a3b78ae8d..009d2b72d3 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -1673,11 +1673,11 @@ current_stacktrace(Process* p, Process* rp, Eterm** hpp) Eterm mfa; Eterm res = NIL; - depth = 8; + depth = erts_backtrace_depth; sz = offsetof(struct StackTrace, trace) + sizeof(BeamInstr *)*depth; s = (struct StackTrace *) erts_alloc(ERTS_ALC_T_TMP, sz); s->depth = 0; - if (rp->i) { + if (depth > 0 && rp->i) { s->trace[s->depth++] = rp->i; depth--; } |