summaryrefslogtreecommitdiff
path: root/lib/profile/GCDAProfiling.c
diff options
context:
space:
mode:
authorMarco Castelluccio <mcastelluccio@mozilla.com>2018-01-03 11:13:45 +0000
committerMarco Castelluccio <mcastelluccio@mozilla.com>2018-01-03 11:13:45 +0000
commit767c0196489b75a48554c7429d7a3b68ab0180c3 (patch)
tree5976e9ffb415ebedae4bba11e873f9e56e64c8b7 /lib/profile/GCDAProfiling.c
parenteb0aba42cb29cce1e832510650e73d2988460fbe (diff)
Flush gcda files before unlocking them
Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=35464. Reviewers: zturner, rnk, void Subscribers: sylvestre.ledru, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D40610 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/GCDAProfiling.c')
-rw-r--r--lib/profile/GCDAProfiling.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c
index ef299f002..4908c246a 100644
--- a/lib/profile/GCDAProfiling.c
+++ b/lib/profile/GCDAProfiling.c
@@ -459,6 +459,7 @@ void llvm_gcda_end_file() {
unmap_file();
}
+ fflush(output_file);
lprofUnlockFd(fd);
fclose(output_file);
output_file = NULL;