diff options
| author | Dan Liew <dan@su-root.co.uk> | 2018-04-20 06:46:09 +0000 |
|---|---|---|
| committer | Dan Liew <dan@su-root.co.uk> | 2018-04-20 06:46:09 +0000 |
| commit | c8879c989e5cdd3999e6093371460b9c282be8f8 (patch) | |
| tree | 883f710458af088d9ef7605ea81c9edf552481fe /compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py | |
| parent | 5d15230c37d2d9c5aa76b48003b34fe1dd12abc9 (diff) | |
| download | bcm5719-llvm-c8879c989e5cdd3999e6093371460b9c282be8f8.tar.gz bcm5719-llvm-c8879c989e5cdd3999e6093371460b9c282be8f8.zip | |
[LibFuzzer] Unbreak the `trace-malloc-unbalanced.test` when using Python 3.
The `unbalanced_allocs.py` script uses Python 2 print statement
and `iteritems()`. Running `2to3` over the script fixes these.
Differential Revision: https://reviews.llvm.org/D45765
llvm-svn: 330389
Diffstat (limited to 'compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py')
| -rwxr-xr-x | compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py b/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py index a4ce187679d..74478ad55af 100755 --- a/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py +++ b/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py @@ -24,9 +24,9 @@ def PrintStack(line, stack): global _skip if _skip > 0: return - print 'Unbalanced ' + line.rstrip(); + print('Unbalanced ' + line.rstrip()); for l in stack: - print l.rstrip() + print(l.rstrip()) def ProcessStack(line, f): stack = [] @@ -63,15 +63,15 @@ def ProcessRun(line, f): return ProcessMalloc(line, f, {}) allocs = {} - print line.rstrip() + print(line.rstrip()) line = f.readline() while line: if line.startswith('MallocFreeTracer: STOP'): global _skip _skip = _skip - 1 - for _, (l, s) in allocs.iteritems(): + for _, (l, s) in allocs.items(): PrintStack(l, s) - print line.rstrip() + print(line.rstrip()) return f.readline() line = ProcessMalloc(line, f, allocs) return line |

