[PATCH] D103119: [scudo] Get rid of initLinkerInitialized

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 25 15:01:26 PDT 2021


cryptoad created this revision.
cryptoad added reviewers: pcc, eugenis, vitalybuka, hctim, cferris.
Herald added a subscriber: jfb.
cryptoad requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

Now that everything is forcibly linker initialized, it feels like a
good time to get rid of the `init`/`initLinkerInitialized` split.

This allows to get rid of various `memset` construct in `init` that
gcc complains about (this fixes a Fuchsia open issue).

I added various `DCHECK`s to ensure that we would get a zero-inited
object when entering `init`, which required ensuring that
`unmapTestOnly` leaves the object in a good state (tests are currently
the only location where an allocator can be "de-initialized").

Running the tests with `--gtest_repeat=` showed no issue.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103119

Files:
  compiler-rt/lib/scudo/standalone/benchmarks/malloc_benchmark.cpp
  compiler-rt/lib/scudo/standalone/bytemap.h
  compiler-rt/lib/scudo/standalone/combined.h
  compiler-rt/lib/scudo/standalone/local_cache.h
  compiler-rt/lib/scudo/standalone/primary32.h
  compiler-rt/lib/scudo/standalone/primary64.h
  compiler-rt/lib/scudo/standalone/quarantine.h
  compiler-rt/lib/scudo/standalone/secondary.h
  compiler-rt/lib/scudo/standalone/stats.h
  compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
  compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp
  compiler-rt/lib/scudo/standalone/tsd.h
  compiler-rt/lib/scudo/standalone/tsd_exclusive.h
  compiler-rt/lib/scudo/standalone/tsd_shared.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103119.347795.patch
Type: text/x-patch
Size: 19133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210525/c1a4325b/attachment.bin>


More information about the llvm-commits mailing list