Page MenuHomePhabricator

[sanitizer] Handle Die() in StopTheWorld.
ClosedPublic

Authored by earthdok on Aug 26 2013, 4:24 AM.

Details

Reviewers
kcc
Summary

Handle calls to Die() from the tracer thread. Fixes a bug where a CHECK
could fail in the tracer thread, resulting in a call to AsanDie. The tracer
thread then exited and the parent process continued execution despite its
address space being in an unusable state.

Diff Detail

Event Timeline

kcc added inline comments.Aug 26 2013, 4:35 AM
lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
194

static?

207

static void ThreadSuspenderDieCallback() ?

233

What if some later change adds a return statement here?
Maybe replace the callback using a scoped object trick?

earthdok updated this revision to Unknown Object (????).Aug 26 2013, 4:48 AM
  • address kcc's comments
earthdok updated this revision to Unknown Object (????).Aug 26 2013, 6:17 AM

move StopTheWorld setup/teardown into a scoped object, as per offline discussion

kcc accepted this revision.Aug 26 2013, 6:20 AM

LGTM

earthdok closed this revision.Dec 5 2014, 9:40 AM