[PATCH] D61654: [scudo][standalone] Introduce the chunk header

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 15:48:44 PDT 2019


cryptoad marked 5 inline comments as done.
cryptoad added inline comments.


================
Comment at: lib/scudo/standalone/chunk.h:69
+#else
+  if (atomic_load_relaxed(&HashAlgorithm) == HardwareCRC32) {
+    u32 Crc = computeHardwareCRC32(Seed, Value);
----------------
vitalybuka wrote:
> cryptoad wrote:
> > vitalybuka wrote:
> > > So you cant guaranty that it does not call computeChecksum before init() so you can avoid atomic operation?
> > I am not sure I understand this, do you mean I should not use atomics?
> > The function should never be called prior to initialization (malloc will call the allocator's init() before servicing an allocation).
> If all threads will be blocked on init() and released after it's done, and global never changes after that then atomic is not needed
This is indeed the case, I will remove the atomic use.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61654/new/

https://reviews.llvm.org/D61654





More information about the llvm-commits mailing list