This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Avoid instrumenting sanitizer functions
ClosedPublic

Authored by etienneb on Sep 14 2016, 8:50 AM.

Details

Summary

Function asan_default_options is called by asan_init before the
shadow memory got initialized. Instrumenting that function may lead
to flaky execution.

As the __asan_default_options is provided by users, we cannot expect
them to add the appropriate function atttributes to avoid
instrumentation.

Diff Detail

Event Timeline

etienneb updated this revision to Diff 71369.Sep 14 2016, 8:50 AM
etienneb retitled this revision from to [compiler-rt] Avoid instrumenting sanitizer functions.
etienneb updated this object.
etienneb added reviewers: rnk, kcc.
etienneb added subscribers: llvm-commits, chrisha.
rnk accepted this revision.Sep 14 2016, 9:02 AM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Sep 14 2016, 9:02 AM
etienneb closed this revision.Sep 14 2016, 10:27 AM
kcc added inline comments.Sep 14 2016, 3:19 PM
lib/Transforms/Instrumentation/AddressSanitizer.cpp
1886

please use startswith() instead of find()

etienneb marked an inline comment as done.Sep 15 2016, 8:28 AM

addressed kcc comment's in revision:

Committed revision 281617.