19 lines · cpp
1// RUN: %clang_msan -O0 -g %s -o %t && %run %t2 3#include <assert.h>4#include <errno.h>5#include <string.h>6 7int main() {8 char buf[1000];9 char *res = strerror_r(EINVAL, buf, sizeof(buf));10 assert(res);11 volatile int z = strlen(res);12 13 res = strerror_r(-1, buf, sizeof(buf));14 assert(res);15 z = strlen(res);16 17 return 0;18}19