From ea8cff230088d442539976c75b85368d38429b06 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 22 Mar 2019 13:32:16 +0100 Subject: etp: Don't crash etp-stack* when c_p->i is null --- erts/etc/unix/etp-commands.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in index e8dc59156f..dc28107ef5 100644 --- a/erts/etc/unix/etp-commands.in +++ b/erts/etc/unix/etp-commands.in @@ -1453,8 +1453,10 @@ define etp-stack-preamble set $etp_stack_p = ($arg0)->stop set $etp_stack_end = ($arg0)->hend printf "%% Stacktrace (%u)\n", $etp_stack_end-$etp_stack_p - etp-1 ((Eterm)($arg0)->i) 0 - printf " (I)\n" + if ($arg0)->i != 0 + etp-1 ((Eterm)($arg0)->i) 0 + printf " (I)\n" + end if ($arg0)->cp != 0 etp-1 ((Eterm)($arg0)->cp) 0 printf " (cp)\n" -- cgit v1.2.3