// RUN: %clangxx_asan -O0 %s -o %t && %t

// Regression test for PR17138.

#include <assert.h>
#include <string.h>

int main() {
  char buf[1024];
  char *res = (char *)strerror_r(300, buf, sizeof(buf));
  assert(res != 0);
  return 0;
}

// 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;
}

Remove a check from strerror_r test.
Remove a check from strerror_r test.

It's not always true: on Android, strerror_r with invalid errno
prints "Unknown error ..." to the buffer and returns 0.

This test now only checks that strerror_r does not crash.


git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@201321 91177308-0d34-0410-b5e6-96231b3b80d8
