]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/coverage-and-lsan.cc
1 // Make sure coverage is dumped even if there are reported leaks.
3 // RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
5 // RUN: rm -rf %T/coverage-and-lsan
7 // RUN: mkdir -p %T/coverage-and-lsan/normal
8 // RUN: %env_asan_opts=coverage=1:coverage_dir=%T/coverage-and-lsan:verbosity=1 not %run %t 2>&1 | FileCheck %s
9 // RUN: %sancov print %T/coverage-and-lsan/*.sancov 2>&1
11 // REQUIRES: leak-detection
14 int main(int argc
, char **argv
) {
19 // CHECK: LeakSanitizer: detected memory leaks