This is an archive of the discontinued LLVM Phabricator instance.

[AddressSanitizer] Only instrument globals of default address space
ClosedPublic

Authored by Ka-Ka on Oct 10 2019, 8:01 AM.

Details

Summary

The address sanitizer ignore memory accesses from different address spaces, however
when instrumenting globals the check for different address spaces is missing. This
result in assertion failure. The fault was found in an out of tree target.

The patch skip all globals of non default address space.

Diff Detail

Event Timeline

Ka-Ka created this revision.Oct 10 2019, 8:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2019, 8:01 AM
Ka-Ka edited the summary of this revision. (Show Details)Oct 10 2019, 10:52 PM
Ka-Ka added a project: Restricted Project.
bjope added a subscriber: bjope.Oct 11 2019, 3:21 AM

the rest is LGTM

test/Instrumentation/AddressSanitizer/global_addrspace.ll
39

can you please remove unnecessary stuff, e.g. debug info

leonardchan accepted this revision.Oct 29 2019, 1:30 PM
This revision is now accepted and ready to land.Oct 29 2019, 1:30 PM
This revision was automatically updated to reflect the committed changes.