This is an archive of the discontinued LLVM Phabricator instance.

[msan] Add support for disable_sanitizer_instrumentation attribute
ClosedPublic

Authored by glider on Aug 17 2021, 3:46 AM.

Details

Summary

Unlike attribute((no_sanitize("memory"))), this one will cause MSan
to skip the entire function during instrumentation.

Depends on https://reviews.llvm.org/D108029

Diff Detail

Event Timeline

glider created this revision.Aug 17 2021, 3:46 AM
glider requested review of this revision.Aug 17 2021, 3:46 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 17 2021, 3:46 AM
This revision is now accepted and ready to land.Aug 17 2021, 10:15 AM
melver accepted this revision.Aug 17 2021, 1:55 PM
melver added inline comments.
clang/docs/MemorySanitizer.rst
91

Could apply a similar wording to what I suggested on https://reviews.llvm.org/D108202 to deter people from using it.

clang/test/CodeGen/sanitize-memory-disable.c
12

Similar to https://reviews.llvm.org/D108202, could use CHECK-LABEL.

glider updated this revision to Diff 367767.Aug 20 2021, 5:38 AM

Updated after landing the disable_sanitizer_instrumentation to LLVM

glider updated this revision to Diff 367774.Aug 20 2021, 6:01 AM
glider marked 2 inline comments as done.

Addressed Marco's comments

glider added inline comments.Aug 20 2021, 6:03 AM
clang/docs/MemorySanitizer.rst
91

There's no difference in stack traces (MSan doesn't instrument function entries/exits). Apart from that, done.

This revision was landed with ongoing or failed builds.Aug 20 2021, 6:14 AM
This revision was automatically updated to reflect the committed changes.