summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2018-09-07 09:10:30 +0000
committerAlexander Potapenko <glider@google.com>2018-09-07 09:10:30 +0000
commit8fe99a0ef28bac6cb247c4b3b56bfcba4fd7b984 (patch)
tree32036ff23f0e77f6c7545032b1818f8f731251e1 /clang/lib/CodeGen/CodeGenFunction.cpp
parenta805c96c65f55e44e713101d4a1dbeb3e7067219 (diff)
downloadbcm5719-llvm-8fe99a0ef28bac6cb247c4b3b56bfcba4fd7b984.tar.gz
bcm5719-llvm-8fe99a0ef28bac6cb247c4b3b56bfcba4fd7b984.zip
[MSan] Add KMSAN instrumentation to MSan pass
Introduce the -msan-kernel flag, which enables the kernel instrumentation. The main differences between KMSAN and MSan instrumentations are: - KMSAN implies msan-track-origins=2, msan-keep-going=true; - there're no explicit accesses to shadow and origin memory. Shadow and origin values for a particular X-byte memory location are read and written via pointers returned by __msan_metadata_ptr_for_load_X(u8 *addr) and __msan_store_shadow_origin_X(u8 *addr, uptr shadow, uptr origin); - TLS variables are stored in a single struct in per-task storage. A call to a function returning that struct is inserted into every instrumented function before the entry block; - __msan_warning() takes a 32-bit origin parameter; - local variables are poisoned with __msan_poison_alloca() upon function entry and unpoisoned with __msan_unpoison_alloca() before leaving the function; - the pass doesn't declare any global variables or add global constructors to the translation unit. llvm-svn: 341637
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud