llvm-project/compiler-rt/test/asan/TestCases/strerror_r_test.cc

15 lines
260 B
C++

// RUN: %clangxx_asan -O0 %s -o %t && %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;
}