[PATCH] D72470: [scudo][standalone] Fork support

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 06:46:12 PST 2020


cryptoad added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/wrappers_c.inc:161
+  while (SCUDO_PREFIX(Disabled))
+    pthread_cond_wait(&SCUDO_PREFIX(Conditional), &SCUDO_PREFIX(Mutex));
   SCUDO_ALLOCATOR.disable();
----------------
eugenis wrote:
> why is this signalling necessary?
> disable() while disabled should block on any of the allocator mutexes just fine.
> 
Yes I might have overthought it.
I was thinking about a situation where one thread would do disable() then one fork() then another enable().
In my head that was going to block somewhere, but in the end I think you are right and that it's not necessary.
I will remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72470





More information about the llvm-commits mailing list