summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/strerror_r_test.cc
blob: d91ad3320afe9cfbc44a2628a239fd325f3759ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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;
}