mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
crit: do not crash on aarch64 doing 'crit x ./ rss'
Running 'crit x ./ rss' on aarch64 crashes with: File "/home/criu/crit/crit/__main__.py", line 331, in explore_rss while vmas[vmi]['start'] < pme: ~~~~^^^^^ IndexError: list index out of range This adds an additional check to the while loop to do access indexes out of range. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
21ea718f9f
commit
615ccf98cf
@ -323,12 +323,12 @@ def explore_rss(opts):
|
|||||||
pvmi = -1
|
pvmi = -1
|
||||||
for pm in pms[1:]:
|
for pm in pms[1:]:
|
||||||
pstr = '\t%lx / %-8d' % (pm['vaddr'], pm['nr_pages'])
|
pstr = '\t%lx / %-8d' % (pm['vaddr'], pm['nr_pages'])
|
||||||
while vmas[vmi]['end'] <= pm['vaddr']:
|
while vmi < len(vmas) and vmas[vmi]['end'] <= pm['vaddr']:
|
||||||
vmi += 1
|
vmi += 1
|
||||||
|
|
||||||
pme = pm['vaddr'] + (pm['nr_pages'] << 12)
|
pme = pm['vaddr'] + (pm['nr_pages'] << 12)
|
||||||
vstr = ''
|
vstr = ''
|
||||||
while vmas[vmi]['start'] < pme:
|
while vmi < len(vmas) and vmas[vmi]['start'] < pme:
|
||||||
vma = vmas[vmi]
|
vma = vmas[vmi]
|
||||||
if vmi == pvmi:
|
if vmi == pvmi:
|
||||||
vstr += ' ~'
|
vstr += ' ~'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user