aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-12-20 18:30:12 +0100
committerGitHub <[email protected]>2016-12-20 18:30:12 +0100
commit420aa50e766560c3316a16695c8c3c1c46138aff (patch)
tree083586ea689839c088d1529d305093101b3b971c /erts/emulator/beam
parentac2de409f9379544234f3356974feb2ac15d4818 (diff)
parent2f8d59aa9e8a96d094172db339fd94aae45a90b5 (diff)
downloadotp-420aa50e766560c3316a16695c8c3c1c46138aff.tar.gz
otp-420aa50e766560c3316a16695c8c3c1c46138aff.tar.bz2
otp-420aa50e766560c3316a16695c8c3c1c46138aff.zip
Merge pull request #1263 from hawk/hm/stacktrace-depth/OTP-14119
Make depth of current_stacktrace configurable
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_bif_info.c4
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 735aabbee3..88a052cad7 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -1672,11 +1672,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--;
}