[compiler-rt] r357732 - [libFuzzer] Another follow up fix for Data Flow scripts in Py3.
Max Moroz via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 4 15:55:19 PDT 2019
Author: dor1s
Date: Thu Apr 4 15:55:18 2019
New Revision: 357732
URL: http://llvm.org/viewvc/llvm-project?rev=357732&view=rev
Log:
[libFuzzer] Another follow up fix for Data Flow scripts in Py3.
Reviewers: Dor1s
Reviewed By: Dor1s
Subscribers: delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D60289
Modified:
compiler-rt/trunk/lib/fuzzer/scripts/merge_data_flow.py
Modified: compiler-rt/trunk/lib/fuzzer/scripts/merge_data_flow.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/scripts/merge_data_flow.py?rev=357732&r1=357731&r2=357732&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/scripts/merge_data_flow.py (original)
+++ compiler-rt/trunk/lib/fuzzer/scripts/merge_data_flow.py Thu Apr 4 15:55:18 2019
@@ -18,7 +18,7 @@ def Merge(a, b):
res = array('b')
for i in range(0, len(a)):
res.append(ord('1' if a[i] == '1' or b[i] == '1' else '0'))
- return res.tostring()
+ return res.tostring().decode('utf-8')
def main(argv):
D = {}
@@ -29,7 +29,11 @@ def main(argv):
else:
D[F] = BV;
for F in D.keys():
- print("%s %s" % (F, str(D[F])))
+ if isinstance(D[F], str):
+ value = D[F]
+ else:
+ value = D[F].decode('utf-8')
+ print("%s %s" % (F, value))
if __name__ == '__main__':
main(sys.argv)
More information about the llvm-commits
mailing list