1 | // Make sure that ASan works with non-cdecl default calling conventions. |
---|---|
2 | // Many x86 projects pass `/Gz` to their compiles, so that __stdcall is the default, |
3 | // but LLVM is built with __cdecl. |
4 | // |
5 | // RUN: %clang_cl_asan -Gz %Od %s %Fe%t |
6 | |
7 | // includes a declaration of `_ReturnAddress` |
8 | #include <intrin.h> |
9 | |
10 | #include <sanitizer/asan_interface.h> |
11 | |
12 | int main() { |
13 | alignas(8) char buffer[8]; |
14 | __asan_poison_memory_region(addr: buffer, size: sizeof buffer); |
15 | } |
16 |