This is an archive of the discontinued LLVM Phabricator instance.

[asan] Do not instrument globals from special purpose llvm sections
ClosedPublic

Authored by zaks.anna on Jun 18 2015, 9:39 AM.

Details

Summary

Do not instrument globals that are placed in sections containing "__llvm" in their name.

ASan interferes with LLVM's PGO, which places its globals into a special section, which is memcpy-ed by the linker as a whole. When those goals are instrumented, ASan's memcpy wrapper reports an issue.

Diff Detail

Event Timeline

zaks.anna updated this revision to Diff 27940.Jun 18 2015, 9:39 AM
zaks.anna retitled this revision from to [asan] Do not instrument globals from special purpose llvm sections.
zaks.anna updated this object.
zaks.anna edited the test plan for this revision. (Show Details)
zaks.anna added reviewers: kcc, bob.wilson.
zaks.anna added subscribers: Unknown Object (MLST), glider, samsonov.

These globals aren't intended to be accessed by the user's code, are they?
LGTM

lib/Transforms/Instrumentation/AddressSanitizer.cpp
1145

s/llvm/LLVM ?

These globals aren't intended to be accessed by the user's code, are they?

Correct.

samsonov accepted this revision.Jun 18 2015, 2:33 PM
samsonov added a reviewer: samsonov.

LGTM

This revision is now accepted and ready to land.Jun 18 2015, 2:33 PM
zaks.anna closed this revision.Jun 25 2015, 6:16 PM

In r240723