learning-gem5: Use zero initialization in hello_goodbye test
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 27 Feb 2020 15:13:51 +0000 (15:13 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 28 Feb 2020 09:32:30 +0000 (09:32 +0000)
commit5c825a5d724653ad3389cf565893fd0ee7dad194
treefb41724d90caabd3ef65b623f818e91261b9424f
parent3e87cf1a35fc73e52a3e6b1c19022595361eb2d1
learning-gem5: Use zero initialization in hello_goodbye test

This is likely fixing:

JIRA: https://gem5.atlassian.net/browse/GEM5-328

the exitCause method was randomically printing an invalid string coming
from a non 0 terminated char buffer, whose pointer is provided via the
exitSimLoop.
By doing zero-initialization we make sure last character is '\0'.

Change-Id: I514a9bd240a0d5489ce9652ad14289f834752abe
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25987
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/learning_gem5/part2/goodbye_object.cc