[AA] Rename CaptureInfo -> CaptureAnalysis (NFC) (#116842)
[llvm-project.git] / compiler-rt / test / msan / check-handler.cpp
blob0bdb433ab78b9cb424c228cefe705d05ebe12bc6
1 // RUN: %clangxx_msan -O0 -g %s -o %t && not %run %t 2>&1 | FileCheck %s
3 // Verify that CHECK handler prints a stack on CHECK fail.
5 #include <stdlib.h>
7 int main(void) {
8 // Allocate chunk from the secondary allocator to trigger CHECK(IsALigned())
9 // in its free() path.
10 void *p = malloc(8 << 20);
11 free(reinterpret_cast<char*>(p) + 1);
12 // CHECK: MemorySanitizer: bad pointer
13 // CHECK: MemorySanitizer: CHECK failed
14 // CHECK: #0
15 return 0;