From 8f25256ae1678fa3cb814b3d28fdfece1008254e Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 4 Jun 2019 17:56:51 +0200 Subject: erts: Fix SEGV crash on shell break (p)roc info esdp==NULL if run by non scheduler thread. --- erts/emulator/beam/break.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c index 80e871aaf6..6379e4e04d 100644 --- a/erts/emulator/beam/break.c +++ b/erts/emulator/beam/break.c @@ -84,8 +84,9 @@ process_info(fmtfn_t to, void *to_arg) * they are most likely just created and has invalid data */ if (p->heap != NULL) { - ErtsProcLocks locks = (p == esdp->current_process || - p == esdp->free_process) ? ERTS_PROC_LOCK_MAIN : 0; + ErtsProcLocks locks = ((esdp && (p == esdp->current_process || + p == esdp->free_process)) + ? ERTS_PROC_LOCK_MAIN : 0); print_process_info(to, to_arg, p, locks); } } -- cgit v1.2.3