[erlang-questions] Segmentation fault when writing erl_crash.dump
Wed Feb 21 08:08:26 CET 2007
"Chris Newcombe" <chris.newcombe@REDACTED> writes:
> Thanks! This fixes the frequent seg-v's that occured if my
> application's regression tests exit with an unexpected
> Please could this fix be included in the next Erlang/OTP release?
> One possible concern; perhaps the original code used a stack-buffer
> instead of erts_alloc incase the reason for the exit was an
> out-of-memory condition?
Yes, that was the reason. Since something bad is known to have happened,
trying to allocate memory is not a good idea.
> It would be unfortunate if this fix
> prevented crash dumps due to memory-allocation issues. I haven't
> looked, but I wonder if it is possible to fix this while still using
> static buffers? (e.g. Checking whether the term fits in the buffer,
> and splitting it/truncating it if it does not fit?)
Seems like a good idea. I'll try to do it for R11B-4.
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions