[PATCH] D40610: Flush gcda files before unlocking them

Marco Castelluccio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 09:15:23 PST 2017


marco-c created this revision.
Herald added subscribers: Sanitizers, llvm-commits.

Fixes https://bugs.llvm.org/show_bug.cgi?id=35464.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D40610

Files:
  lib/profile/GCDAProfiling.c


Index: lib/profile/GCDAProfiling.c
===================================================================
--- lib/profile/GCDAProfiling.c
+++ lib/profile/GCDAProfiling.c
@@ -465,6 +465,7 @@
       unmap_file();
     }
 
+    fflush(output_file);
     flock(fd, LOCK_UN);
     fclose(output_file);
     output_file = NULL;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40610.124764.patch
Type: text/x-patch
Size: 319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171129/130df9ae/attachment.bin>


More information about the llvm-commits mailing list