[compiler-rt] r321702 - Flush gcda files before unlocking them

Marco Castelluccio via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 03:13:45 PST 2018


Author: marco
Date: Wed Jan  3 03:13:45 2018
New Revision: 321702

URL: http://llvm.org/viewvc/llvm-project?rev=321702&view=rev
Log:
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

Modified:
    compiler-rt/trunk/lib/profile/GCDAProfiling.c

Modified: compiler-rt/trunk/lib/profile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?rev=321702&r1=321701&r2=321702&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/GCDAProfiling.c (original)
+++ compiler-rt/trunk/lib/profile/GCDAProfiling.c Wed Jan  3 03:13:45 2018
@@ -459,6 +459,7 @@ void llvm_gcda_end_file() {
       unmap_file();
     }
 
+    fflush(output_file);
     lprofUnlockFd(fd);
     fclose(output_file);
     output_file = NULL;




More information about the llvm-commits mailing list