diff options
| author | Xinliang David Li <davidxl@google.com> | 2015-12-15 22:18:11 +0000 |
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2015-12-15 22:18:11 +0000 |
| commit | be49271399d86a610ce7d03da6aa352bb4bea810 (patch) | |
| tree | 59c595181b3d8ecb8c1d75521725ec3ddd4dfc94 /compiler-rt | |
| parent | 8dcfcf79abf0359a367568dc0c57e01d9d82c6d2 (diff) | |
| download | bcm5719-llvm-be49271399d86a610ce7d03da6aa352bb4bea810.tar.gz bcm5719-llvm-be49271399d86a610ce7d03da6aa352bb4bea810.zip | |
[PGO] Open file with explict binary mode
Patch by: Johan Engelen
On windows, opening in text mode will result in
line ending chars to be appended leading to
profile corruption.
llvm-svn: 255684
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfilingFile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c index 35a3b48db84..4fc7693345b 100644 --- a/compiler-rt/lib/profile/InstrProfilingFile.c +++ b/compiler-rt/lib/profile/InstrProfilingFile.c @@ -46,7 +46,7 @@ static int writeFileWithName(const char *OutputName) { return -1; /* Append to the file to support profiling multiple shared objects. */ - OutputFile = fopen(OutputName, "a"); + OutputFile = fopen(OutputName, "ab"); if (!OutputFile) return -1; |

