[all-commits] [llvm/llvm-project] 02ce9d: [compiler-rt] Add a critical section when flushing...

calixteman via All-commits all-commits at lists.llvm.org
Thu Dec 12 00:25:43 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 02ce9d8ef5a84bc884de4105eae5f8736ef67634
      https://github.com/llvm/llvm-project/commit/02ce9d8ef5a84bc884de4105eae5f8736ef67634
  Author: Calixte Denizet <calixte.denizet at gmail.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M compiler-rt/lib/profile/GCDAProfiling.c

  Log Message:
  -----------
  [compiler-rt] Add a critical section when flushing gcov counters

Summary:
Counters can be flushed in a multi-threaded context for example when the process is forked in different threads (https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp#L632-L663).
In order to avoid pretty bad things, a critical section is needed around the flush.
We had a lot of crashes in this code in Firefox CI when we switched to clang for linux ccov builds and those crashes disappeared with this patch.

Reviewers: marco-c, froydnj, dmajor, davidxl, vsk

Reviewed By: marco-c, dmajor

Subscribers: ahatanak, froydnj, dmajor, dberris, jfb, #sanitizers, llvm-commits, sylvestre.ledru

Tags: #sanitizers, #llvm

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




More information about the All-commits mailing list