brintos

brintos / llvm-project-archived public Read only

0
0
Text · 594 B · 18c809c Raw
19 lines · cpp
1// Test that lsan reports a proper error when running under strace.2// REQUIRES: strace3// RUN: %clangxx_lsan %s -o %t4// RUN: not strace -o /dev/null %run %t 2>&1 | FileCheck %s5// FIXME: This technically works in practice but cannot be tested because the6// fatal-error caused adb to failed. Could not be captured to stderr to lit-check.7// XFAIL: android8 9#include <stdio.h>10#include <stdlib.h>11 12static volatile void *sink;13 14int main() {15  sink = malloc(42);16}17// CHECK: LeakSanitizer has encountered a fatal error18// CHECK: HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)19