From 726dd54e7c60bc1d3e39f200dbae537c7d3cc612 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Tue, 8 Jan 2019 01:07:34 +0000 Subject: [asan] Support running without /proc Summary: This patch lets ASan run when /proc is not accessible (ex. not mounted yet). It includes a special test-only flag that emulates this condition in an unpriviledged process. This only matters on Linux, where /proc is necessary to enumerate virtual memory mappings. Reviewers: vitalybuka, pcc, krytarowski Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D56141 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@350590 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/Posix/no-fd.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/asan/TestCases/Posix/no-fd.cc') diff --git a/test/asan/TestCases/Posix/no-fd.cc b/test/asan/TestCases/Posix/no-fd.cc index 1c94545c7..b0441e925 100644 --- a/test/asan/TestCases/Posix/no-fd.cc +++ b/test/asan/TestCases/Posix/no-fd.cc @@ -9,6 +9,10 @@ #include #include +extern "C" const char *__asan_default_options() { + return "test_only_emulate_no_memorymap=1"; +} + void parent(int argc, char **argv) { fprintf(stderr, "hello\n"); // CHECK: hello -- cgit v1.2.1