Skip to content

Commit

Permalink
Flush gcda files before unlocking them
Browse files Browse the repository at this point in the history
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

llvm-svn: 321702
  • Loading branch information
marco-c committed Jan 3, 2018
1 parent 65c766e commit ba3a619
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler-rt/lib/profile/GCDAProfiling.c
Expand Up @@ -459,6 +459,7 @@ void llvm_gcda_end_file() {
unmap_file();
}

fflush(output_file);
lprofUnlockFd(fd);
fclose(output_file);
output_file = NULL;
Expand Down

0 comments on commit ba3a619

Please sign in to comment.