This is an archive of the discontinued LLVM Phabricator instance.

[lsan] Reduce StopTheWorld access to StackDepot
ClosedPublic

Authored by vitalybuka on Dec 7 2021, 1:55 PM.

Details

Summary

StackDepot locks some stuff. As is there is small probability to
deadlock if we stop thread which locked the Depot.

We need either Lock/Unlock StackDepot for StopTheWorld, or don't
interact with StackDepot from there.

This patch does not run LeakReport under StopTheWorld. LeakReport
contains most of StackDepot access.

As a bonus this patch will help to resolve kMaxLeaksConsidered FIXME.

Depends on D114498.

Diff Detail

Event Timeline

vitalybuka requested review of this revision.Dec 7 2021, 1:55 PM
vitalybuka created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2021, 1:55 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
kstoimenov accepted this revision.Dec 8 2021, 9:29 AM

LGTM

compiler-rt/lib/lsan/lsan_common.cpp
836

Strange alignment.

This revision is now accepted and ready to land.Dec 8 2021, 9:29 AM
morehouse accepted this revision.Dec 9 2021, 7:39 AM
This revision was landed with ongoing or failed builds.Dec 9 2021, 11:43 AM
This revision was automatically updated to reflect the committed changes.