diff options
Diffstat (limited to 'test/asan/TestCases/alloca_loop_unpoisoning.cc')
-rw-r--r-- | test/asan/TestCases/alloca_loop_unpoisoning.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/asan/TestCases/alloca_loop_unpoisoning.cc b/test/asan/TestCases/alloca_loop_unpoisoning.cc index 3621a09aa720..539279292674 100644 --- a/test/asan/TestCases/alloca_loop_unpoisoning.cc +++ b/test/asan/TestCases/alloca_loop_unpoisoning.cc @@ -6,10 +6,15 @@ // This testcase checks that allocas and VLAs inside loop are correctly unpoisoned. #include <assert.h> -#include <alloca.h> #include <stdint.h> +#include <stdlib.h> #include "sanitizer/asan_interface.h" +// MSVC provides _alloca instead of alloca. +#if defined(_MSC_VER) && !defined(alloca) +# define alloca _alloca +#endif + void *top, *bot; __attribute__((noinline)) void foo(int len) { |