Changeset View
Changeset View
Standalone View
Standalone View
compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc
// Regression test for | // Regression test for | ||||
// https://code.google.com/p/chromium/issues/detail?id=446692 | // https://code.google.com/p/chromium/issues/detail?id=446692 | ||||
// where asan consumed too much RAM due to transparent hugetables. | // where asan consumed too much RAM due to transparent hugetables. | ||||
// | // | ||||
// RUN: %clangxx_asan -g %s -o %t | // RUN: %clangxx_asan -g %s -o %t | ||||
// RUN: %env_asan_opts=no_huge_pages_for_shadow=1 %run %t 2>&1 | FileCheck %s | // RUN: %env_asan_opts=no_huge_pages_for_shadow=1 %run %t 2>&1 | FileCheck %s | ||||
// RUN: %run %t 2>&1 | FileCheck %s | // RUN: %run %t 2>&1 | FileCheck %s | ||||
// | // | ||||
// Would be great to run the test with no_huge_pages_for_shadow=0, but | // Would be great to run the test with no_huge_pages_for_shadow=0, but | ||||
// the result will depend on the OS version and settings... | // the result will depend on the OS version and settings... | ||||
// | // | ||||
// REQUIRES: x86_64-target-arch | // REQUIRES: x86_64-target-arch, shadow-scale-3 | ||||
// | // | ||||
// WARNING: this test is very subtle and may nto work on some systems. | // WARNING: this test is very subtle and may nto work on some systems. | ||||
// If this is the case we'll need to futher improve it or disable it. | // If this is the case we'll need to futher improve it or disable it. | ||||
#include <assert.h> | #include <assert.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <sys/mman.h> | #include <sys/mman.h> | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |