forked from OSchip/llvm-project
[asan] fix one test on 32-bit Mac 10.7; enable another test on Mac
llvm-svn: 157237
This commit is contained in:
parent
53b4b73be9
commit
4fa4ac1290
|
@ -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__
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue