Skip to content
  1. Apr 07, 2014
  2. Apr 04, 2014
  3. Apr 03, 2014
    • Alexey Samsonov's avatar
      [TSan] Fix a rare deadlock on multithreaded fork. · 425314a6
      Alexey Samsonov authored
      If a multi-threaded program calls fork(), TSan ignores all memory accesses
      in the child to prevent deadlocks in TSan runtime. This is OK, as child is
      probably going to call exec() as soon as possible. However, a rare deadlocks
      could be caused by ThreadIgnoreBegin() function itself.
      
      ThreadIgnoreBegin() remembers the current stack trace and puts it into the
      StackDepot to report a warning later if a thread exited with ignores enabled.
      Using StackDepotPut in a child process is dangerous: it locks a mutex on
      a slow path, which could be already locked in a parent process.
      
      The fix is simple: just don't put current stack traces to StackDepot in
      ThreadIgnoreBegin() and ThreadIgnoreSyncBegin() functions if we're
      running after a multithreaded fork. We will not report any
      "thread exited with ignores enabled" errors in this case anyway.
      
      Submitting this without a testcase, as I believe the standalone reproducer
      is pretty hard to construct.
      
      llvm-svn: 205534
      425314a6
    • Alexey Samsonov's avatar
      [TSan] Fix a typo ThreadIgnoreSyncEnd. Found by inspection · b4525218
      Alexey Samsonov authored
      llvm-svn: 205531
      b4525218
  4. Apr 02, 2014
  5. Apr 01, 2014
  6. Mar 31, 2014
  7. Mar 28, 2014
Loading