1 | // RUN: %clangxx_hwasan %s -o %t |
2 | #include <stddef.h> |
3 | #include <new> |
4 | |
5 | char *__dummy; |
6 | |
7 | void *operator new(size_t size) { return __dummy; } |
8 | void *operator new[](size_t size) { return __dummy; } |
9 | void *operator new(size_t size, std::nothrow_t const&) noexcept { |
10 | return __dummy; |
11 | } |
12 | void *operator new[](size_t size, std::nothrow_t const&) noexcept { |
13 | return __dummy; |
14 | } |
15 | |
16 | void operator delete(void *ptr) noexcept {} |
17 | void operator delete[](void *ptr) noexcept {} |
18 | void operator delete(void *ptr, std::nothrow_t const&) noexcept {} |
19 | void operator delete[](void *ptr, std::nothrow_t const&) noexcept {} |
20 | |
21 | int main() { |
22 | return 0; |
23 | } |
24 | |