Changeset View
Changeset View
Standalone View
Standalone View
compiler-rt/test/msan/unpoison_param.cpp
// Tests that __msan_unpoison_param() works as specified. To prevent MSan | // Tests that __msan_unpoison_param() works as specified. To prevent MSan | ||||
// instrumentation from modifying parameter shadow before each call to foo(), we | // instrumentation from modifying parameter shadow before each call to foo(), we | ||||
// compile main() without MSan. | // compile main() without MSan. | ||||
// RUN: %clangxx_msan -fno-sanitize=memory -c %s -o %t-main.o | // RUN: %clangxx_msan -fno-sanitize=memory -c %s -o %t-main.o | ||||
// RUN: %clangxx_msan %t-main.o %s -o %t | // RUN: %clangxx_msan -fno-sanitize-memory-param-retval %t-main.o %s -o %t | ||||
// RUN: %run %t | // RUN: %run %t | ||||
#include <assert.h> | #include <assert.h> | ||||
#include <sanitizer/msan_interface.h> | #include <sanitizer/msan_interface.h> | ||||
#if __has_feature(memory_sanitizer) | #if __has_feature(memory_sanitizer) | ||||
__attribute__((noinline)) int bar(int a, int b) { | __attribute__((noinline)) int bar(int a, int b) { | ||||
Show All 37 Lines |