Message ID | 20200214232650.35381-1-kevinb@redhat.com |
---|---|
State | New |
Headers | show |
Series | Handle gdb.MemoryError exception in dump-guest-memory.py | expand |
Patchew URL: https://patchew.org/QEMU/20200214232650.35381-1-kevinb@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] Handle gdb.MemoryError exception in dump-guest-memory.py Message-id: 20200214232650.35381-1-kevinb@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === From https://github.com/patchew-project/qemu * [new tag] patchew/20200214232650.35381-1-kevinb@redhat.com -> patchew/20200214232650.35381-1-kevinb@redhat.com Switched to a new branch 'test' b41300a Handle gdb.MemoryError exception in dump-guest-memory.py === OUTPUT BEGIN === ERROR: Missing Signed-off-by: line(s) total: 1 errors, 0 warnings, 13 lines checked Commit b41300af0818 (Handle gdb.MemoryError exception in dump-guest-memory.py) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20200214232650.35381-1-kevinb@redhat.com/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py index 4177261d33..fbdfba458b 100644 --- a/scripts/dump-guest-memory.py +++ b/scripts/dump-guest-memory.py @@ -539,7 +539,12 @@ shape and this command should mostly work.""" while left > 0: chunk_size = min(TARGET_PAGE_SIZE, left) - chunk = qemu_core.read_memory(cur, chunk_size) + try: + chunk = qemu_core.read_memory(cur, chunk_size) + except gdb.MemoryError: + # Consider blocks of memory absent from a core file + # as being zeroed. + chunk = bytes(chunk_size) vmcore.write(chunk) cur += chunk_size left -= chunk_size