[compiler-rt] r294307 - sancov.py: [Py3] Use bytes.decode() explicitly.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 7 06:13:18 PST 2017
Author: chapuni
Date: Tue Feb 7 08:13:18 2017
New Revision: 294307
URL: http://llvm.org/viewvc/llvm-project?rev=294307&view=rev
Log:
sancov.py: [Py3] Use bytes.decode() explicitly.
Or bogus filename like "b'foo'" would be generated.
This is part of https://reviews.llvm.org/D27405
Modified:
compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py
Modified: compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py?rev=294307&r1=294306&r2=294307&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py Tue Feb 7 08:13:18 2017
@@ -113,7 +113,7 @@ def UnpackOneFile(path):
if len(header) < 12:
break
pid, module_length, blob_size = struct.unpack('iII', header)
- module = f.read(module_length)
+ module = f.read(module_length).decode('utf-8')
blob = f.read(blob_size)
assert(len(module) == module_length)
assert(len(blob) == blob_size)
More information about the llvm-commits
mailing list