aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2019-06-12 09:51:20 +0200
committerErlang/OTP <[email protected]>2019-06-12 09:51:20 +0200
commit089ce1ca4be5ef12b86d7c806e30a31031d1ea6e (patch)
treec777b13a4aa83ac4cb091249eeef8cb35c9bd612
parent9fbc06998e2165b0ba33274eb659794999b1577c (diff)
parent8f25256ae1678fa3cb814b3d28fdfece1008254e (diff)
downloadotp-089ce1ca4be5ef12b86d7c806e30a31031d1ea6e.tar.gz
otp-089ce1ca4be5ef12b86d7c806e30a31031d1ea6e.tar.bz2
otp-089ce1ca4be5ef12b86d7c806e30a31031d1ea6e.zip
Merge branch 'sverker/erts/break-p-segv/ERL-965/OTP-15873' into maint-22
* sverker/erts/break-p-segv/ERL-965/OTP-15873: erts: Fix SEGV crash on shell break (p)roc info
-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);
}
}