- add XFAIL/UNSUPPORTED annotations for tests run wtih real MSVC - macroify usages of clang-specific attributes in asan tests - Add substitution for /Oy-/-fno-omit-frame-pointer This makes the dll_intercept_memset test work with mingw These are most of the changes that are required to get things running with MSVC, however there are some remaining build-flag tweaks. Nothing in here should be a functional change.
21 lines
587 B
C++
21 lines
587 B
C++
// RUN: %clang_cl_asan %Od %p/dll_host.cpp %Fe%t
|
|
// RUN: %clang_cl_asan %LD %Od %s %Fe%t.dll
|
|
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
|
|
|
|
#include "../defines.h"
|
|
|
|
ATTRIBUTE_NOINLINE
|
|
static void NullDeref(int *ptr) {
|
|
// CHECK: ERROR: AddressSanitizer: access-violation on unknown address
|
|
// CHECK: {{0x0*000.. .*pc 0x.*}}
|
|
ptr[10]++; // BOOM
|
|
}
|
|
|
|
extern "C" __declspec(dllexport)
|
|
int test_function() {
|
|
NullDeref((int*)0);
|
|
// CHECK: {{ #1 0x.* in test_function .*\dll_null_deref.cpp:}}[[@LINE-1]]
|
|
// CHECK: AddressSanitizer can not provide additional info.
|
|
return 0;
|
|
}
|