diff options
author | Björn-Egil Dahlberg <[email protected]> | 2013-10-18 16:47:19 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2013-10-18 16:47:19 +0200 |
commit | e25f74afd0705f686d0fc949e4362c73d6da15fa (patch) | |
tree | 92f2a1325ddaa9c77331692c840f4d12cb463ed2 /erts/emulator/beam/erl_process.c | |
parent | b44b726bd45c8a8b5cf84f2bc2fb570f05bc3074 (diff) | |
download | otp-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/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 434d5ca147..5cfaf1b5ee 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -7471,6 +7471,7 @@ alloc_process(ErtsRunQueue *rq, erts_aint32_t state) p->approx_started = erts_get_approx_time(); p->rcount = 0; + p->heap = NULL; ASSERT(p == (Process *) (erts_ptab_pix2intptr_nob( @@ -7583,7 +7584,6 @@ erl_create_process(Process* parent, /* Parent of process (default group leader). hipe_init_process_smp(&p->hipe_smp); #endif #endif - p->heap = (Eterm *) ERTS_HEAP_ALLOC(ERTS_ALC_T_HEAP, sizeof(Eterm)*sz); p->old_hend = p->old_htop = p->old_heap = NULL; p->high_water = p->heap; |