diff options
-rw-r--r-- | base/allocator/allocator_shim.cc | 16 | ||||
-rw-r--r-- | base/process/process_util_unittest.cc | 3 | ||||
-rw-r--r-- | base/security_unittest.cc | 4 | ||||
-rw-r--r-- | base/test/test_timeouts.cc | 2 | ||||
-rw-r--r-- | base/tools_sanity_unittest.cc | 8 | ||||
-rw-r--r-- | build/common.gypi | 2 | ||||
-rw-r--r-- | chrome/browser/accessibility/accessibility_extension_apitest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/active_tab_apitest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/api/context_menus/context_menu_apitest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/api/cookies/cookies_apitest.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_version_info_win.cc | 2 | ||||
-rw-r--r-- | chrome/test/ppapi/ppapi_interactive_browsertest.cc | 2 | ||||
-rw-r--r-- | chrome_elf/elf_imports_unittest.cc | 11 | ||||
-rw-r--r-- | content/renderer/render_frame_impl.cc | 8 |
15 files changed, 40 insertions, 38 deletions
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc index d2dd5a4..c0de36e 100644 --- a/base/allocator/allocator_shim.cc +++ b/base/allocator/allocator_shim.cc @@ -41,8 +41,8 @@ typedef enum { // See SetupSubprocessAllocator() to specify a default secondary (subprocess) // allocator. // TODO(jar): Switch to using TCMALLOC for the renderer as well. -#if (defined(ADDRESS_SANITIZER) && defined(OS_WIN)) -// The Windows implementation of Asan requires the use of "WINHEAP". +#if defined(SYZYASAN) +// SyzyASan requires the use of "WINHEAP". static Allocator allocator = WINHEAP; #else static Allocator allocator = TCMALLOC; @@ -228,9 +228,9 @@ static void release_free_memory_thunk() { // The CRT heap initialization stub. extern "C" int _heap_init() { -// Don't use the environment variable if ADDRESS_SANITIZER is defined on -// Windows, as the implementation requires Winheap to be the allocator. -#if !(defined(ADDRESS_SANITIZER) && defined(OS_WIN)) +// Don't use the environment variable if SYZYASAN is defined, as the +// implementation requires Winheap to be the allocator. +#if !defined(SYZYASAN) const char* environment_value = GetenvBeforeMain(primary_name); if (environment_value) { if (!stricmp(environment_value, "winheap")) @@ -356,9 +356,9 @@ void SetupSubprocessAllocator() { buffer[sizeof(buffer) - 1] = '\0'; if (secondary_length || !primary_length) { - // Don't use the environment variable if ADDRESS_SANITIZER is defined on - // Windows, as the implementation require Winheap to be the allocator. -#if !(defined(ADDRESS_SANITIZER) && defined(OS_WIN)) +// Don't use the environment variable if SYZYASAN is defined, as the +// implementation require Winheap to be the allocator. +#if !defined(SYZYASAN) const char* secondary_value = secondary_length ? buffer : "TCMALLOC"; // Force renderer (or other subprocesses) to use secondary_value. #else diff --git a/base/process/process_util_unittest.cc b/base/process/process_util_unittest.cc index 41a8dd6..250b06a 100644 --- a/base/process/process_util_unittest.cc +++ b/base/process/process_util_unittest.cc @@ -235,7 +235,8 @@ MULTIPROCESS_TEST_MAIN(CrashingChildProcess) { // This test intentionally crashes, so we don't need to run it under // AddressSanitizer. // TODO(jschuh): crbug.com/175753 Fix this in Win64 bots. -#if defined(ADDRESS_SANITIZER) || (defined(OS_WIN) && defined(ARCH_CPU_X86_64)) +#if defined(ADDRESS_SANITIZER) || \ + (defined(OS_WIN) && defined(ARCH_CPU_X86_64)) || defined(SYZYASAN) #define MAYBE_GetTerminationStatusCrash DISABLED_GetTerminationStatusCrash #else #define MAYBE_GetTerminationStatusCrash GetTerminationStatusCrash diff --git a/base/security_unittest.cc b/base/security_unittest.cc index d613f34c..6735f6a 100644 --- a/base/security_unittest.cc +++ b/base/security_unittest.cc @@ -43,11 +43,11 @@ Type HideValueFromCompiler(volatile Type value) { } // - NO_TCMALLOC (should be defined if compiled with use_allocator!="tcmalloc") -// - ADDRESS_SANITIZER because it has its own memory allocator +// - ADDRESS_SANITIZER and SYZYASAN because they have their own memory allocator // - IOS does not use tcmalloc // - OS_MACOSX does not use tcmalloc #if !defined(NO_TCMALLOC) && !defined(ADDRESS_SANITIZER) && \ - !defined(OS_IOS) && !defined(OS_MACOSX) + !defined(OS_IOS) && !defined(OS_MACOSX) && !defined(SYZYASAN) #define TCMALLOC_TEST(function) function #else #define TCMALLOC_TEST(function) DISABLED_##function diff --git a/base/test/test_timeouts.cc b/base/test/test_timeouts.cc index 467c0fe..5302626 100644 --- a/base/test/test_timeouts.cc +++ b/base/test/test_timeouts.cc @@ -16,7 +16,7 @@ namespace { // ASan and TSan instrument each memory access. This may slow the execution // down significantly. -#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) +#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || defined(SYZYASAN) static const int kTimeoutMultiplier = 2; #else static const int kTimeoutMultiplier = 1; diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc index c763a32a..a7db5f3 100644 --- a/base/tools_sanity_unittest.cc +++ b/base/tools_sanity_unittest.cc @@ -20,7 +20,7 @@ const base::subtle::Atomic32 kMagicValue = 42; // Helper for memory accesses that can potentially corrupt memory or cause a // crash during a native run. -#if defined(ADDRESS_SANITIZER) +#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) #if defined(OS_IOS) // EXPECT_DEATH is not supported on IOS. #define HARMFUL_ACCESS(action,error_regexp) do { action; } while (0) @@ -113,7 +113,7 @@ TEST(ToolsSanityTest, MemoryLeak) { // tests should be put back under the (defined(OS_IOS) || defined(OS_WIN)) // clause above. // See also http://crbug.com/172614. -#if defined(ADDRESS_SANITIZER) +#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) #define MAYBE_SingleElementDeletedWithBraces \ DISABLED_SingleElementDeletedWithBraces #define MAYBE_ArrayDeletedWithoutBraces DISABLED_ArrayDeletedWithoutBraces @@ -135,7 +135,7 @@ TEST(ToolsSanityTest, MAYBE_AccessesToMallocMemory) { } TEST(ToolsSanityTest, MAYBE_ArrayDeletedWithoutBraces) { -#if !defined(ADDRESS_SANITIZER) +#if !defined(ADDRESS_SANITIZER) && !defined(SYZYASAN) // This test may corrupt memory if not run under Valgrind or compiled with // AddressSanitizer. if (!RunningOnValgrind()) @@ -161,7 +161,7 @@ TEST(ToolsSanityTest, MAYBE_SingleElementDeletedWithBraces) { delete [] foo; } -#if defined(ADDRESS_SANITIZER) +#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) TEST(ToolsSanityTest, DISABLED_AddressSanitizerNullDerefCrashTest) { // Intentionally crash to make sure AddressSanitizer is running. // This test should not be ran on bots. diff --git a/build/common.gypi b/build/common.gypi index 11ab19d..98e9ace 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -2436,7 +2436,7 @@ }, }, 'defines': [ - 'ADDRESS_SANITIZER', + 'SYZYASAN', 'MEMORY_TOOL_REPLACES_ALLOCATOR', ], }], diff --git a/chrome/browser/accessibility/accessibility_extension_apitest.cc b/chrome/browser/accessibility/accessibility_extension_apitest.cc index 00a1013..10b55c2 100644 --- a/chrome/browser/accessibility/accessibility_extension_apitest.cc +++ b/chrome/browser/accessibility/accessibility_extension_apitest.cc @@ -12,8 +12,8 @@ #include "chrome/test/base/test_switches.h" #include "extensions/common/switches.h" -// Times out on win asan, http://crbug.com/166026 -#if defined(OS_WIN) && defined(ADDRESS_SANITIZER) +// Times out on win syzyasan, http://crbug.com/166026 +#if defined(SYZYASAN) #define MAYBE_GetAlertsForTab DISABLED_GetAlertsForTab #else #define MAYBE_GetAlertsForTab GetAlertsForTab diff --git a/chrome/browser/extensions/active_tab_apitest.cc b/chrome/browser/extensions/active_tab_apitest.cc index 3e91b924..1ad461c 100644 --- a/chrome/browser/extensions/active_tab_apitest.cc +++ b/chrome/browser/extensions/active_tab_apitest.cc @@ -13,8 +13,8 @@ namespace extensions { namespace { -// Times out on win asan, http://crbug.com/166026 -#if defined(OS_WIN) && defined(ADDRESS_SANITIZER) +// Times out on win syzyasan, http://crbug.com/166026 +#if defined(SYZYASAN) #define MAYBE_ActiveTab DISABLED_ActiveTab #else #define MAYBE_ActiveTab ActiveTab diff --git a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc index 6a0b3e3..580c404d 100644 --- a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc +++ b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc @@ -16,8 +16,8 @@ #include "chrome/common/pref_names.h" #include "components/user_prefs/user_prefs.h" -// Times out on win asan, http://crbug.com/166026 -#if defined(OS_WIN) && defined(ADDRESS_SANITIZER) +// Times out on win syzyasan, http://crbug.com/166026 +#if defined(SYZYASAN) #define MAYBE_BookmarkManager DISABLED_BookmarkManager #else #define MAYBE_BookmarkManager BookmarkManager diff --git a/chrome/browser/extensions/api/context_menus/context_menu_apitest.cc b/chrome/browser/extensions/api/context_menus/context_menu_apitest.cc index 85d2441..b0afc15 100644 --- a/chrome/browser/extensions/api/context_menus/context_menu_apitest.cc +++ b/chrome/browser/extensions/api/context_menus/context_menu_apitest.cc @@ -11,8 +11,8 @@ namespace extensions { -// Times out on win asan, http://crbug.com/166026 -#if defined(OS_WIN) && defined(ADDRESS_SANITIZER) +// Times out on win syzyasan, http://crbug.com/166026 +#if defined(SYZYASAN) #define MAYBE_ContextMenus DISABLED_ContextMenus #else #define MAYBE_ContextMenus ContextMenus diff --git a/chrome/browser/extensions/api/cookies/cookies_apitest.cc b/chrome/browser/extensions/api/cookies/cookies_apitest.cc index 1be7ba1..1144669 100644 --- a/chrome/browser/extensions/api/cookies/cookies_apitest.cc +++ b/chrome/browser/extensions/api/cookies/cookies_apitest.cc @@ -8,8 +8,8 @@ namespace extensions { -// Times out on win asan, http://crbug.com/166026 -#if defined(OS_WIN) && defined(ADDRESS_SANITIZER) +// Times out on win syzyasan, http://crbug.com/166026 +#if defined(SYZYASAN) #define MAYBE_Cookies DISABLED_Cookies #else #define MAYBE_Cookies Cookies diff --git a/chrome/common/chrome_version_info_win.cc b/chrome/common/chrome_version_info_win.cc index e540c2d..b52e51e 100644 --- a/chrome/common/chrome_version_info_win.cc +++ b/chrome/common/chrome_version_info_win.cc @@ -27,7 +27,7 @@ std::string VersionInfo::GetVersionStringModifier() { GoogleUpdateSettings::GetChromeChannelAndModifiers(is_system_install, &channel); } -#if defined(ADDRESS_SANITIZER) +#if defined(SYZYASAN) if (base::debug::IsBinaryInstrumented()) channel += L" SyzyASan"; #endif diff --git a/chrome/test/ppapi/ppapi_interactive_browsertest.cc b/chrome/test/ppapi/ppapi_interactive_browsertest.cc index cb6a5fd..0552a8b 100644 --- a/chrome/test/ppapi/ppapi_interactive_browsertest.cc +++ b/chrome/test/ppapi/ppapi_interactive_browsertest.cc @@ -16,7 +16,7 @@ // Disable tests under ASAN. http://crbug.com/104832. // This is a bit heavy handed, but the majority of these tests fail under ASAN. // See bug for history. -#if !defined(ADDRESS_SANITIZER) +#if !defined(ADDRESS_SANITIZER) && !defined(SYZYASAN) // Disabled due to timeouts: http://crbug.com/136548 IN_PROC_BROWSER_TEST_F( diff --git a/chrome_elf/elf_imports_unittest.cc b/chrome_elf/elf_imports_unittest.cc index c4b9dd4..136912b 100644 --- a/chrome_elf/elf_imports_unittest.cc +++ b/chrome_elf/elf_imports_unittest.cc @@ -61,12 +61,13 @@ TEST_F(ELFImportsTest, ChromeElfSanityCheck) { std::vector<std::string>::iterator it(elf_imports.begin()); static const char* const kValidFilePatterns[] = { - "KERNEL32.dll", - "MSVC*", -#if defined(ADDRESS_SANITIZER) - "syzyasan_rtl.dll", + "KERNEL32.dll", + "MSVC*", +#if defined(SYZYASAN) + "syzyasan_rtl.dll", #endif - "ADVAPI32.dll"}; + "ADVAPI32.dll" + }; // Make sure all of ELF's imports are in the valid imports list. for (; it != elf_imports.end(); it++) { diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 970dc4d..fde9b05 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -176,7 +176,7 @@ NOINLINE static void CrashIntentionally() { *zero = 0; } -#if defined(ADDRESS_SANITIZER) +#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) NOINLINE static void MaybeTriggerAsanError(const GURL& url) { // NOTE(rogerm): We intentionally perform an invalid heap access here in // order to trigger an Address Sanitizer (ASAN) error report. @@ -208,7 +208,7 @@ NOINLINE static void MaybeTriggerAsanError(const GURL& url) { // Make sure the assignments to the dummy value aren't optimized away. base::debug::Alias(&dummy); } -#endif // ADDRESS_SANITIZER +#endif // ADDRESS_SANITIZER || SYZYASAN static void MaybeHandleDebugURL(const GURL& url) { if (!url.SchemeIs(kChromeUIScheme)) @@ -225,9 +225,9 @@ static void MaybeHandleDebugURL(const GURL& url) { base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); } -#if defined(ADDRESS_SANITIZER) +#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) MaybeTriggerAsanError(url); -#endif // ADDRESS_SANITIZER +#endif // ADDRESS_SANITIZER || SYZYASAN } // Returns false unless this is a top-level navigation. |