Pavel Labath 19cad6f089 [Sanitizer] Make wcrtomb test posix-only
wcrtomb is not intercepted on windows, so this test fails there. It's
not clear to me why we do not intercept this function there (I'll look
into that separately), but for now this should at least make the windows
sanitizer bot green again (broken by r357889, when I added this test).

I also add "UNSUPPORTED: android" as this function is also not
intercepted there.

llvm-svn: 357892
2019-04-08 09:13:13 +00:00

17 lines
336 B
C

// Function not intercepted on android.
// UNSUPPORTED: android
// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
#include <stdlib.h>
#include <wchar.h>
int main() {
char *buff = (char*) malloc(MB_CUR_MAX);
free(buff);
wcrtomb(buff, L'a', NULL);
// CHECK: use-after-free
// CHECK: SUMMARY
return 0;
}