hanchenye-llvm-project/compiler-rt/test/msan/mallinfo.cc

13 lines
254 B
C++
Raw Normal View History

// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t
#include <assert.h>
#include <malloc.h>
#include <sanitizer/msan_interface.h>
int main(void) {
struct mallinfo mi = mallinfo();
assert(__msan_test_shadow(&mi, sizeof(mi)) == -1);
return 0;
}