dev: Fix segmentation fault in VirtIOBlock
authorChun-Chen TK Hsu <chunchenhsu@google.com>
Fri, 6 Sep 2019 11:42:56 +0000 (19:42 +0800)
committerChun-Chen TK Hsu <chunchenhsu@google.com>
Fri, 6 Sep 2019 16:14:30 +0000 (16:14 +0000)
commit665b67e365b11e791ff23b833d866d9ca4ffee77
tree2bb89f10aa001d4f2ea567b267c3d0ccc7321e9e
parent36a575071cd460255ca67ec5bdd6862d9c164919
dev: Fix segmentation fault in VirtIOBlock

GEM5 got a segmentation fault when the size is large in
VirtIOBlock::write. This change uses a vector to avoid this segmentation
fault.

Signed-off-by: Chun-Chen TK Hsu <chunchenhsu@google.com>
Change-Id: I26272686a6e7e39cdf2389657ecd38ce90261144
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20679
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/virtio/block.cc