This is an archive of the discontinued LLVM Phabricator instance.

[tsan] Prefer mangled name when looking up global variable declaration for racy address
ClosedPublic

Authored by dcoughlin on May 27 2016, 4:37 PM.

Details

Summary

For Thread Sanitizer reports, LLDB tries to find a global variable declaration corresponding to the racy address in order to provide a filename and line number. This commit changes the lookup of the variable to use the mangled name for lookup and fall back to the demangled version if unavailable. This is needed to report locations of races on Swift global variables.

I've also added a test to make sure we look up C++ globals correctly.

Diff Detail

Repository
rL LLVM

Event Timeline

dcoughlin updated this revision to Diff 58862.May 27 2016, 4:37 PM
dcoughlin retitled this revision from to [tsan] Prefer mangled name when looking up global variable declaration for racy address.
dcoughlin updated this object.
dcoughlin added reviewers: kubamracek, clayborg.
dcoughlin added a subscriber: lldb-commits.
clayborg accepted this revision.May 27 2016, 4:42 PM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.May 27 2016, 4:42 PM
This revision was automatically updated to reflect the committed changes.