[PATCH] D60289: [libFuzzer] Another follow up fix for Data Flow scripts in Py3.

Max Moroz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 15:54:24 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT357732: [libFuzzer] Another follow up fix for Data Flow scripts in Py3. (authored by Dor1s, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D60289?vs=193797&id=193798#toc

Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60289/new/

https://reviews.llvm.org/D60289

Files:
  lib/fuzzer/scripts/merge_data_flow.py


Index: lib/fuzzer/scripts/merge_data_flow.py
===================================================================
--- lib/fuzzer/scripts/merge_data_flow.py
+++ lib/fuzzer/scripts/merge_data_flow.py
@@ -18,7 +18,7 @@
   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 @@
     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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60289.193798.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190404/8db89f86/attachment.bin>


More information about the llvm-commits mailing list