This is an archive of the discontinued LLVM Phabricator instance.

[asan] Make __asan_handle_no_return tolerate unregistered threads
ClosedPublic

Authored by rnk on Jul 22 2015, 1:26 PM.

Details

Summary

On Windows, thread injection by the kernel or other running processes is
a fairly common occurrence, so ASan should be resilient to it. The
comments on GetCurrentThread() say that it can return null, so we
shouldn't be CHECK failing if it does.

Sending control-C is one way to get the kernel to inject a thread into
your process, so I wrote a test around it.

Diff Detail

Event Timeline

rnk updated this revision to Diff 30389.Jul 22 2015, 1:26 PM
rnk retitled this revision from to [asan] Make __asan_handle_no_return tolerate unregistered threads.
rnk updated this object.
rnk added a reviewer: llvm-commits.
rnk added a subscriber: samsonov.
samsonov accepted this revision.Jul 22 2015, 2:32 PM
samsonov added a reviewer: samsonov.

LGTM (OMG the test is complex).

This revision is now accepted and ready to land.Jul 22 2015, 2:32 PM
rnk added a comment.Jul 22 2015, 2:40 PM

LGTM (OMG the test is complex).

I spent more time on MSDN figuring out how to write an automated test than I did writing the fix. =P

This revision was automatically updated to reflect the committed changes.