[all-commits] [llvm/llvm-project] 564530: Add missing call to `Symbolizer::LateInitialize()`...

danliew via All-commits all-commits at lists.llvm.org
Tue Apr 21 18:45:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 564530e50ad4870801a2080a08645cc1cc2df805
      https://github.com/llvm/llvm-project/commit/564530e50ad4870801a2080a08645cc1cc2df805
  Author: Dan Liew <dan at su-root.co.uk>
  Date:   2020-04-21 (Tue, 21 Apr 2020)

  Changed paths:
    M compiler-rt/lib/ubsan/ubsan_init.cpp

  Log Message:
  -----------
  Add missing call to `Symbolizer::LateInitialize()` in UBSan's standalone init.

Summary:
This fixes symbolization in Standalone UBSan mode for the Darwin simulators.

861b69faee5df8d4e13ef316c7474a10e4069e81 (rdar://problem/58789439) tried to fix
symbolization for all sanitizers on Darwin simulators but unfortunately it only
fixed the problem for TSan.

For UBSan in standalone mode the fix wasn't sufficient because UBSan's
standalone init doesn't call `Symbolizer::LateInitialize()` like ASan
and TSan do. This meant that `AtosSymbolizerProcess::LateInitialize()`
was never being called before
`AtosSymbolizerProcess::StartSymbolizerSubprocess()` which breaks an
invariant we expect to hold.

The missing call to `Symbolizer::LateInitialize()` during UBSan's
standalone init seems like an accidently omission so this patch simply
adds it.

rdar://problem/62083617

Reviewers: vitalybuka, kubamracek, yln, samsonov

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D78530


  Commit: da820f4f5753062501a14ae4336b1c055535e54f
      https://github.com/llvm/llvm-project/commit/da820f4f5753062501a14ae4336b1c055535e54f
  Author: Dan Liew <dan at su-root.co.uk>
  Date:   2020-04-21 (Tue, 21 Apr 2020)

  Changed paths:
    M compiler-rt/lib/ubsan/ubsan_init.cpp

  Log Message:
  -----------
  Add missing call to `__sanitizer::InitializePlatformEarly()` in UBSan's standalone init.

Summary:
While working on rdar://problem/62083617 I noticed this call was
missing.

This is a no-op for all platforms except Darwin. For Darwin this
means the `use_xnu_fast_mmap` flag is initialized as it was intended
when using UBSan in standalone mode.

Reviewers: vitalybuka, vsk, kubamracek, yln, samsonov

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D78532


Compare: https://github.com/llvm/llvm-project/compare/4ca2cad947d0...da820f4f5753


More information about the All-commits mailing list