This is an archive of the discontinued LLVM Phabricator instance.

[windows] Fix deadlock on mmap failure due to CHECK recursion
ClosedPublic

Authored by rnk on Aug 12 2015, 4:26 PM.

Details

Summary

Printing a stacktrace acquires a spinlock, and the sanitizer spinlocks
aren't re-entrant. Avoid the problem by reusing the logic we already
have on Posix.

This failure mode is already exercised by the existing mmap_limit_mb.cc
test case. It will be enabled in a forthcoming change, so I didn't add
standalone tests for this change.

Diff Detail

Event Timeline

rnk updated this revision to Diff 32002.Aug 12 2015, 4:26 PM
rnk retitled this revision from to [windows] Fix deadlock on mmap failure due to CHECK recursion.
rnk updated this object.
rnk added a reviewer: samsonov.
rnk added a subscriber: llvm-commits.
samsonov accepted this revision.Aug 12 2015, 4:41 PM
samsonov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 12 2015, 4:41 PM
This revision was automatically updated to reflect the committed changes.