1// RUN: %clangxx_asan -O0 %s -o %t && %run %t
2
3// Regression test for PR17138.
4
5#include <assert.h>
6#include <string.h>
7#include <stdio.h>
8
9int main() {
10  char buf[1024];
11  char *res = (char *)strerror_r(300, buf, sizeof(buf));
12  printf("%p\n", res);
13  return 0;
14}
15