diff options
author | Sverker Eriksson <[email protected]> | 2019-06-04 17:56:51 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-06-04 18:08:55 +0200 |
commit | 8f25256ae1678fa3cb814b3d28fdfece1008254e (patch) | |
tree | 6700aa60ed72359b0d0fb9663327a2f388f2c6c9 /erts/emulator/beam/break.c | |
parent | 6618ce7b6a621e92db72ea4f01f7d38553c8818c (diff) | |
download | otp-8f25256ae1678fa3cb814b3d28fdfece1008254e.tar.gz otp-8f25256ae1678fa3cb814b3d28fdfece1008254e.tar.bz2 otp-8f25256ae1678fa3cb814b3d28fdfece1008254e.zip |
erts: Fix SEGV crash on shell break (p)roc info
esdp==NULL if run by non scheduler thread.
Diffstat (limited to 'erts/emulator/beam/break.c')
-rw-r--r-- | erts/emulator/beam/break.c | 5 |
1 files 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); } } |