summaryrefslogtreecommitdiff
path: root/lib/msan/lit_tests/dlerror.cc
blob: 281b3164fd7e99ba9cfad802f46d7614e5651a19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t

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

int main(void) {
  void *p = dlopen("/bad/file/name", RTLD_NOW);
  assert(!p);
  char *s = dlerror();
  printf("%s, %zu\n", s, strlen(s));
  return 0;
}