Files
clang-p2996/compiler-rt/test/asan/TestCases/Posix/strerror_r_test.cpp
Nico Weber 673dc3d4a0 compiler-rt: Rename cc files below test/asan to cpp
See r367803 and similar other changes.

llvm-svn: 367887
2019-08-05 16:48:12 +00:00

15 lines
265 B
C++

// RUN: %clangxx_asan -O0 %s -o %t && %run %t
// Regression test for PR17138.
#include <assert.h>
#include <string.h>
#include <stdio.h>
int main() {
char buf[1024];
char *res = (char *)strerror_r(300, buf, sizeof(buf));
printf("%p\n", res);
return 0;
}