You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
594 B
19 lines
594 B
// Test that lsan reports a proper error when running under strace.
|
|
// REQUIRES: strace
|
|
// RUN: %clangxx_lsan %s -o %t
|
|
// RUN: not strace -o /dev/null %run %t 2>&1 | FileCheck %s
|
|
// FIXME: This technically works in practice but cannot be tested because the
|
|
// fatal-error caused adb to failed. Could not be captured to stderr to lit-check.
|
|
// XFAIL: android
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
static volatile void *sink;
|
|
|
|
int main() {
|
|
sink = malloc(42);
|
|
}
|
|
// CHECK: LeakSanitizer has encountered a fatal error
|
|
// CHECK: HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
|