1 // Check that we properly report mmap failure.
2 // RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s
6 #include <sys/resource.h>
8 static volatile void *x
;
10 int main(int argc
, char **argv
) {
11 struct rlimit mmap_resource_limit
= { 0, 0 };
12 assert(0 == setrlimit(RLIMIT_AS
, &mmap_resource_limit
));
14 // CHECK: ERROR: Failed to mmap