llvm-project/compiler-rt/test/asan/TestCases/verbose-log-path_test.cpp
Aiden Grossman 8e8e46aeb6
[compiler-rt][sanitizers] Mark three tests as unsupported on Android
These tests were already XFailed on Android, but are unresolved when
running under the internal shell rather than failing due to missing file
paths, which is likely the same reason they are xfailed. This does make
it slightly worse if someone accidentally fixes these tests for Android
without realizing it, but the alternative is likely fixing the
functionality/test on Android.

Reviewers: vitalybuka, eugenis, thurstond, fmayer

Reviewed By: fmayer

Pull Request: https://github.com/llvm/llvm-project/pull/166639
2025-11-07 12:24:36 -08:00

26 lines
795 B
C++

// UNSUPPORTED: system-windows
// RUN: rm -rf %t-dir && mkdir -p %t-dir
// RUN: %clangxx_asan %s -o %t-dir/verbose-log-path_test-binary
// Good log_path.
// RUN: rm -f %t-dir/asan.log.*
// RUN: %env_asan_opts=log_path=%t-dir/asan.log:log_exe_name=1 not %run %t-dir/verbose-log-path_test-binary 2> %t.out
// RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t-dir/asan.log.verbose-log-path_test-binary.*
// FIXME: only FreeBSD, NetBSD and Linux have verbose log paths now.
// XFAIL: target={{.*windows-msvc.*}}
// UNSUPPORTED: ios, android
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv) {
if (argc > 2) return 0;
char *x = (char*)malloc(10);
memset(x, 0, 10);
int res = x[argc * 10]; // BOOOM
free(x);
return res;
}
// CHECK-ERROR: ERROR: AddressSanitizer