aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/break.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-10-18 16:47:19 +0200
committerBjörn-Egil Dahlberg <[email protected]>2013-10-18 16:47:19 +0200
commite25f74afd0705f686d0fc949e4362c73d6da15fa (patch)
tree92f2a1325ddaa9c77331692c840f4d12cb463ed2 /erts/emulator/beam/break.c
parentb44b726bd45c8a8b5cf84f2bc2fb570f05bc3074 (diff)
downloadotp-e25f74afd0705f686d0fc949e4362c73d6da15fa.tar.gz
otp-e25f74afd0705f686d0fc949e4362c73d6da15fa.tar.bz2
otp-e25f74afd0705f686d0fc949e4362c73d6da15fa.zip
erts: Fix segfaulting crashdump writing
Crashdumps initiated by out-of-memory on spawn could cause the beam to segfault during crashdump writing due to invalid pointers. The pointers are invalid since the process creation never finished. This commit remedies this problem by removing the process from crashdump printout.
Diffstat (limited to 'erts/emulator/beam/break.c')
-rw-r--r--erts/emulator/beam/break.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c
index ad9a89b642..99604fa3bc 100644
--- a/erts/emulator/beam/break.c
+++ b/erts/emulator/beam/break.c
@@ -76,7 +76,10 @@ process_info(int to, void *to_arg)
for (i = 0; i < max; i++) {
Process *p = erts_pix2proc(i);
if (p && p->i != ENULL) {
- if (!ERTS_PROC_IS_EXITING(p))
+ /* Do not include processes with no heap,
+ * they are most likely just created and has invalid data
+ */
+ if (!ERTS_PROC_IS_EXITING(p) && p->heap != NULL)
print_process_info(to, to_arg, p);
}
}