diff --git a/base/BUILD.gn b/base/BUILD.gn index c791c442e4cd..c8d4ef4da44c 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -3236,7 +3236,7 @@ test("base_unittests") { "json/values_util_unittest.cc", "lazy_instance_unittest.cc", - # "logging_unittest.cc", + "logging_unittest.cc", "memory/aligned_memory_unittest.cc", # "memory/discardable_memory_backing_field_trial_unittest.cc", diff --git a/base/logging.cc b/base/logging.cc index 402ff6b25ac5..d0d0e3038acb 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -31,7 +31,8 @@ #include "base/debug/crash_logging.h" #endif // !BUILDFLAG(IS_NACL) -#if defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL) +#if (defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL)) || \ + (defined(STARBOARD) && defined(ADDRESS_SANITIZER)) #include "base/debug/leak_annotations.h" #endif // defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL) @@ -1380,7 +1381,8 @@ void ScopedVmoduleSwitches::InitWithSwitches( // Make sure we are only initialized once. CHECK(!scoped_vlog_info_); { -#if defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL) +#if (defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL)) || \ + (defined(STARBOARD) && defined(ADDRESS_SANITIZER)) // See comments on |g_vlog_info|. ScopedLeakSanitizerDisabler lsan_disabler; #endif // defined(LEAK_SANITIZER) diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc index 3b1793947b0e..b24760b3dc8b 100644 --- a/base/logging_unittest.cc +++ b/base/logging_unittest.cc @@ -236,7 +236,8 @@ TEST_F(LoggingTest, LogToStdErrFlag) { // Check that messages with severity ERROR or higher are always logged to // stderr if no log-destinations are set, other than LOG_TO_FILE. // This test is currently only POSIX-compatible. -#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) +#if (BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)) && \ + !defined(USE_HACKY_COBALT_CHANGES) namespace { void TestForLogToStderr(int log_destinations, bool* did_log_info, @@ -309,7 +310,8 @@ TEST_F(LoggingTest, AlwaysLogErrorsToStderr) { EXPECT_TRUE(did_log_info); EXPECT_TRUE(did_log_error); } -#endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) +#endif // (BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)) && + // !defined(USE_HACKY_COBALT_CHANGES) #if BUILDFLAG(IS_CHROMEOS_ASH) TEST_F(LoggingTest, InitWithFileDescriptor) { @@ -643,6 +645,7 @@ void SpawnChildAndCrash(int death_location, uintptr_t* child_crash_addr) { ASSERT_EQ(static_cast(sizeof(uintptr_t)), res); } +#if !defined(USE_HACKY_COBALT_CHANGES) TEST_F(LoggingTest, CheckCausesDistinctBreakpoints) { uintptr_t child_crash_addr_1 = 0; uintptr_t child_crash_addr_2 = 0; @@ -659,6 +662,7 @@ TEST_F(LoggingTest, CheckCausesDistinctBreakpoints) { ASSERT_NE(child_crash_addr_1, child_crash_addr_3); ASSERT_NE(child_crash_addr_2, child_crash_addr_3); } +#endif // !defined(USE_HACKY_COBALT_CHANGES) #endif // BUILDFLAG(IS_POSIX) TEST_F(LoggingTest, DebugLoggingReleaseBehavior) {