Commit 4ea01676 authored by Ilia Samsonov's avatar Ilia Samsonov Committed by Commit Bot

Use symbolization script for any sanitizer.

https://codereview.chromium.org/2857643002 forced all sanitizers
builds to print address offsets only. This output is meant to run
through tools/valgrind/asan/asan_symbolize.py

yet test_env has different configuration to run through the asan_symbolize.py.

The asan and tsan builds for this cl give meaningful output.

Before,
Stack trace:
#0 0x55d1d54e8bc3 (/b/s/w/ir/out/Release/content_browsertests+0x1cf42bc2)
#1 0x55d1ccb003ab (/b/s/w/ir/out/Release/content_browsertests+0x1455a3aa)
#2 0x55d1ccb2b740 (/b/s/w/ir/out/Release/content_browsertests+0x1458573f)
#3 0x55d1ccb29747 (/b/s/w/ir/out/Release/content_browsertests+0x14583746)
#4 0x55d1c82f2530 (/b/s/w/ir/out/Release/content_browsertests+0xfd4c52f)
#5 0x55d1d40a8d42 (/b/s/w/ir/out/Release/content_browsertests+0x1bb02d41)
#6 0x55d1d4333e88 (/b/s/w/ir/out/Release/content_browsertests+0x1bd8de87)
#7 0x55d1d16f3fc2 (/b/s/w/ir/out/Release/content_browsertests+0x1914dfc1)
#8 0x55d1d2e62e79 (/b/s/w/ir/out/Release/content_browsertests+0x1a8bce78)
#9 0x55d1d16f0f65 (/b/s/w/ir/out/Release/content_browsertests+0x1914af64)
#10 0x55d1d16fb299 (/b/s/w/ir/out/Release/content_browsertests+0x19155298)
#11 0x55d1d16eb211 (/b/s/w/ir/out/Release/content_browsertests+0x19145210)
#12 0x55d1d1085a78 (/b/s/w/ir/out/Release/content_browsertests+0x18adfa77)
#13 0x55d1d1084d99 (/b/s/w/ir/out/Release/content_browsertests+0x18aded98)
#14 0x55d1dba2402c (/b/s/w/ir/out/Release/content_browsertests+0x2347e02b)

After,
Stack trace:
    #0 0x562f0d54eee3 in StackTrace ./../../base/debug/stack_trace.cc:206:12
    #1 0x562f0d54eee3 in base::debug::StackTrace::StackTrace() ./../../base/debug/stack_trace.cc:203:28
    #2 0x562f051de24b in StackTraceGetter::CurrentStackTrace(int, int) ./../../third_party/googletest/custom/gtest/internal/custom/stack_trace_getter.cc:22:27
    #3 0x562f051fdb40 in testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop(int) ./../../third_party/googletest/src/googletest/src/gtest.cc:820:35
    #4 0x562f051fc527 in testing::internal::AssertHelper::operator=(testing::Message const&) const ./../../third_party/googletest/src/googletest/src/gtest.cc:401:25
    #5 0x562f0127b36b in content::PointerLockBrowserTest_PointerLockWheelEventRouting_Test::RunTestOnMainThread() ./../../content/browser/pointer_lock_browsertest.cc:518:5
    #6 0x562f0c30fba6 in content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() ./../../content/public/test/browser_test_base.cc:656:5
    #7 0x562f0c54407b in Run ./../../base/callback.h:132:12
    #8 0x562f0c54407b in content::ShellBrowserMainParts::PreMainMessageLoopRun() ./../../content/shell/browser/shell_browser_main_parts.cc:168:26
    #9 0x562f09b284d2 in content::BrowserMainLoop::PreMainMessageLoopRun() ./../../content/browser/browser_main_loop.cc:1031:13
    #10 0x562f0b1a6839 in Run ./../../base/callback.h:98:12
    #11 0x562f0b1a6839 in content::StartupTaskRunner::RunAllTasksNow() ./../../content/browser/startup_task_runner.cc:41:29
    #12 0x562f09b25475 in content::BrowserMainLoop::CreateStartupTasks() ./../../content/browser/browser_main_loop.cc:940:25
    #13 0x562f09b2f519 in content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) ./../../content/browser/browser_main_runner_impl.cc:128:15
    #14 0x562f09b1f61f in content::BrowserMain(content::MainFunctionParams const&) ./../../content/browser/browser_main.cc:43:32
    #15 0x562f0959b1e8 in RunBrowserProcessMain ./../../content/app/content_main_runner_impl.cc:527:10
    #16 0x562f0959b1e8 in content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) ./../../content/app/content_main_runner_impl.cc:960:10
    #17 0x562f0959a50d in content::ContentMainRunnerImpl::Run(bool) ./../../content/app/content_main_runner_impl.cc:868:12
    #18 0x562f1327ce25 in service_manager::Main(service_manager::MainParams const&) ./../../services/service_manager/embedder/main.cc:423:29


Bug: 877205
Change-Id: Ib83c3e72919f0d1664cd2e2d338cbd21982d1c0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894762Reviewed-by: default avatarAlexander Potapenko <glider@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: Ilia Samsonov <isamsonov@google.com>
Cr-Commit-Position: refs/heads/master@{#720662}
parent 1a1be2cb
...@@ -318,9 +318,9 @@ def run_executable(cmd, env, stdoutfile=None): ...@@ -318,9 +318,9 @@ def run_executable(cmd, env, stdoutfile=None):
# Symbolization works in-process on Windows even when sandboxed. # Symbolization works in-process on Windows even when sandboxed.
use_symbolization_script = False use_symbolization_script = False
else: else:
# LSan doesn't support sandboxing yet, so we use the in-process symbolizer. # If any sanitizer is enabled, we print unsymbolized stack trace
# Note that ASan and MSan can work together with LSan. # that is required to run through symbolization script.
use_symbolization_script = (asan or msan or cfi_diag) and not lsan use_symbolization_script = (asan or msan or cfi_diag or lsan or tsan)
if asan or lsan or msan or tsan or cfi_diag: if asan or lsan or msan or tsan or cfi_diag:
extra_env.update(get_sanitizer_env(cmd, asan, lsan, msan, tsan, cfi_diag)) extra_env.update(get_sanitizer_env(cmd, asan, lsan, msan, tsan, cfi_diag))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment