mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 18:46:40 +00:00

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
17 lines
336 B
C
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;
|
|
}
|