[asan] fix one test on 32-bit Mac 10.7; enable another test on Mac

llvm-svn: 157237
This commit is contained in:
Kostya Serebryany 2012-05-22 07:44:30 +00:00
parent 53b4b73be9
commit 4fa4ac1290
2 changed files with 3 additions and 5 deletions

View File

@ -363,8 +363,6 @@ TEST(AddressSanitizerInterface, SetErrorReportCallbackTest) {
__asan_set_error_report_callback(NULL);
}
#ifdef __linux__
// http://code.google.com/p/address-sanitizer/issues/detail?id=51
TEST(AddressSanitizerInterface, GetOwnershipStressTest) {
std::vector<char *> pointers;
std::vector<size_t> sizes;
@ -385,4 +383,3 @@ TEST(AddressSanitizerInterface, GetOwnershipStressTest) {
for (size_t i = 0, n = pointers.size(); i < n; i++)
free(pointers[i]);
}
#endif // __linux__

View File

@ -423,10 +423,11 @@ TEST(AddressSanitizer, LargeMallocTest) {
TEST(AddressSanitizer, HugeMallocTest) {
#ifdef __APPLE__
// It was empirically found out that 1215 megabytes is the maximum amount of
// memory available to the process under AddressSanitizer on Darwin.
// memory available to the process under AddressSanitizer on 32-bit Mac 10.6.
// 32-bit Mac 10.7 gives even less (< 1G).
// (the libSystem malloc() allows allocating up to 2300 megabytes without
// ASan).
size_t n_megs = __WORDSIZE == 32 ? 1200 : 4100;
size_t n_megs = __WORDSIZE == 32 ? 500 : 4100;
#else
size_t n_megs = __WORDSIZE == 32 ? 2600 : 4100;
#endif