This is an archive of the discontinued LLVM Phabricator instance.

[asan] Don't check ODR violations for particular types of globals
ClosedPublic

Authored by vitalybuka on Dec 12 2018, 2:29 PM.

Details

Summary

private and internal: should not trigger ODR at all.
unnamed_addr: current ODR checking approach fail and rereport false violation if
a linker merges such globals
linkonce_odr, weak_odr: could cause similar problems and they are already not
instrumented for ELF.

Diff Detail

Repository
rC Clang

Event Timeline

vitalybuka created this revision.Dec 12 2018, 2:29 PM
eugenis added inline comments.Dec 12 2018, 2:54 PM
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
2193 ↗(On Diff #177928)

did you mean "from linker optimizations"?

eugenis accepted this revision.Dec 12 2018, 3:08 PM

LGTM

This revision is now accepted and ready to land.Dec 12 2018, 3:08 PM
This revision was automatically updated to reflect the committed changes.