From 767c0196489b75a48554c7429d7a3b68ab0180c3 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Wed, 3 Jan 2018 11:13:45 +0000 Subject: 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 --- lib/profile/GCDAProfiling.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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; -- cgit v1.2.3