diff options
author | Calixte Denizet <calixte.denizet@gmail.com> | 2020-04-20 10:50:30 +0200 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2020-05-07 11:18:56 -0700 |
commit | f082d91801645e999aa8b1072392f945405eafc5 (patch) | |
tree | 3a75e36c1a3eac9e6e3cdf2a4206c25de610e76c /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | baeb500a8ca52b144d1bc14a04130964d68eaade (diff) | |
download | bcm5719-llvm-f082d91801645e999aa8b1072392f945405eafc5.tar.gz bcm5719-llvm-f082d91801645e999aa8b1072392f945405eafc5.zip |
[profile] Don't crash when forking in several threads
Summary:
When forking in several threads, the counters were written out in using the same global static variables (see GCDAProfiling.c): that leads to crashes.
So when there is a fork, the counters are resetted in the child process and they will be dumped at exit using the interprocess file locking.
When there is an exec, the counters are written out and in case of failures they're resetted.
Reviewers: jfb, vsk, marco-c, serge-sans-paille
Reviewed By: marco-c, serge-sans-paille
Subscribers: llvm-commits, serge-sans-paille, dmajor, cfe-commits, hiraditya, dexonsmith, #sanitizers, marco-c, sylvestre.ledru
Tags: #sanitizers, #clang, #llvm
Differential Revision: https://reviews.llvm.org/D78477
(cherry picked from commit bec223a9bc4eb9747993ee9a4c1aa135c32123e6)
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions