HomeFreeBSD

Suspend all other threads in the process while generating a core dump.
rS144851Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Suspend all other threads in the process while generating a core dump.
The main reason for doing this is that the ELF dump handler expects
the thread list to be fixed while the dump header is generated, so an
upcall that occurs at the wrong time can lead to buffer overruns and
other Bad Things.

Another solution would be to grab sched_lock in the ELF dump handler,
but we might as well single-thread, since the process is about to die.
Furthermore, I think this should ensure that the register sets in the
core file are sequentially consistent.

Details

Provenance
dasAuthored on
Parents
rS144850: Centralize usage in usage(), and use in preference to fprintf().
Branches
Unknown
Tags
Unknown

Event Timeline