OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 | 1062 |
1063 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { | 1063 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { |
1064 return 0; | 1064 return 0; |
1065 } | 1065 } |
1066 | 1066 |
1067 #endif // defined(OS_POSIX) | 1067 #endif // defined(OS_POSIX) |
1068 | 1068 |
1069 // Android doesn't implement set_new_handler, so we can't use the | 1069 // Android doesn't implement set_new_handler, so we can't use the |
1070 // OutOfMemoryTest cases. | 1070 // OutOfMemoryTest cases. |
1071 // OpenBSD does not support these tests either. | 1071 // OpenBSD does not support these tests either. |
1072 // AddressSanitizer defines the malloc()/free()/etc. functions so that they | 1072 // AddressSanitizer and ThreadSanitizer define the malloc()/free()/etc. |
1073 // don't crash if the program is out of memory, so the OOM tests aren't supposed | 1073 // functions so that they don't crash if the program is out of memory, so the |
1074 // to work. | 1074 // OOM tests aren't supposed to work. |
1075 // TODO(vandebo) make this work on Windows too. | 1075 // TODO(vandebo) make this work on Windows too. |
1076 #if !defined(OS_ANDROID) && !defined(OS_OPENBSD) && \ | 1076 #if !defined(OS_ANDROID) && !defined(OS_OPENBSD) && \ |
1077 !defined(OS_WIN) && !defined(ADDRESS_SANITIZER) | 1077 !defined(OS_WIN) && \ |
| 1078 !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) |
1078 | 1079 |
1079 #if defined(USE_TCMALLOC) | 1080 #if defined(USE_TCMALLOC) |
1080 extern "C" { | 1081 extern "C" { |
1081 int tc_set_new_mode(int mode); | 1082 int tc_set_new_mode(int mode); |
1082 } | 1083 } |
1083 #endif // defined(USE_TCMALLOC) | 1084 #endif // defined(USE_TCMALLOC) |
1084 | 1085 |
1085 class OutOfMemoryDeathTest : public testing::Test { | 1086 class OutOfMemoryDeathTest : public testing::Test { |
1086 public: | 1087 public: |
1087 OutOfMemoryDeathTest() | 1088 OutOfMemoryDeathTest() |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 SetUpInDeathAssert(); | 1285 SetUpInDeathAssert(); |
1285 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} | 1286 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} |
1286 }, ""); | 1287 }, ""); |
1287 } | 1288 } |
1288 | 1289 |
1289 #endif // !ARCH_CPU_64_BITS | 1290 #endif // !ARCH_CPU_64_BITS |
1290 #endif // OS_MACOSX | 1291 #endif // OS_MACOSX |
1291 | 1292 |
1292 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && | 1293 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && |
1293 // !defined(OS_WIN) && !defined(ADDRESS_SANITIZER) | 1294 // !defined(OS_WIN) && !defined(ADDRESS_SANITIZER) |
OLD | NEW |