aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-06-04 17:56:51 +0200
committerSverker Eriksson <[email protected]>2019-06-04 18:08:55 +0200
commit8f25256ae1678fa3cb814b3d28fdfece1008254e (patch)
tree6700aa60ed72359b0d0fb9663327a2f388f2c6c9 /erts
parent6618ce7b6a621e92db72ea4f01f7d38553c8818c (diff)
downloadotp-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')
-rw-r--r--erts/emulator/beam/break.c5
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);
}
}