summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-11 09:30:25 +0000
committerMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-11 09:30:25 +0000
commitbe5beb3433ff12695ae248b7c7ea7a85a6c78264 (patch)
treeff212f2b3ebba166624c90a6b3e7938225a47c01 /lib
parent2b21d99e40a4c999ddb13c858b66800ec17cf24f (diff)
Fix reading 32 bit gcov tag values on little-endian machines
Summary: The write buffer contains signed chars, which means the shift operations caused values such as the arc tag value (0x01a10000) to be read incorrectly (0xffa10000). This fixes a regression from https://reviews.llvm.org/D49132. Reviewers: uweigand, davidxl Reviewed By: uweigand Subscribers: llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49161 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/profile/GCDAProfiling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c
index 5e32fc47f..f5c647c77 100644
--- a/lib/profile/GCDAProfiling.c
+++ b/lib/profile/GCDAProfiling.c
@@ -79,7 +79,7 @@ static FILE *output_file = NULL;
* Buffer that we write things into.
*/
#define WRITE_BUFFER_SIZE (128 * 1024)
-static char *write_buffer = NULL;
+static unsigned char *write_buffer = NULL;
static uint64_t cur_buffer_size = 0;
static uint64_t cur_pos = 0;
static uint64_t file_size = 0;