diff options
author | Lars Volker <lv@cloudera.com> | 2017-05-10 14:09:11 +0200 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2017-05-10 18:02:37 +0000 |
commit | 54a54702a1b76853263584d71f53fec45860220e (patch) | |
tree | 1be27278e37846cecedc7a1cb0612910309d1418 /src/client/mac/crash_generation/ConfigFile.mm | |
parent | Fixing breakpad on old linux kernel (diff) | |
download | breakpad-54a54702a1b76853263584d71f53fec45860220e.tar.xz |
Fix race in ExceptionHandler::GenerateDump()
When writing a minidump on Linux, we called clone() in
linux/handler/exception_handler.cc with the CLONE_FILES flag. If the
parent process died while the child waited for the continuation signal,
the write side of the pipe 'fdes' stayed open in the child. The child
would not receive a SIGPIPE and would wait forever.
To fix this, we clone without CLONE_FILES and then close the
read-side of fdes in the master before the ptrace call. That way, if the
master dies, the child will receive a SIGPIPE and will die, too.
To test this I added a sleep() call before SendContinueSignalToChild()
and then killed the master, manually observing that the child would die,
too.
Bug: 728
Change-Id: Ifd72de835a34e7d9852ae1a362e707fdc6c96c7e
Reviewed-on: https://chromium-review.googlesource.com/464708
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'src/client/mac/crash_generation/ConfigFile.mm')
0 files changed, 0 insertions, 0 deletions