changeset fd92c46655ad in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=fd92c46655ad
description:
        ARM: Fix valgrind reported error on O3 that was causing minor stats 
changes.

diffstat:

 src/arch/arm/linux/atag.hh |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r c92153af04ac -r fd92c46655ad src/arch/arm/linux/atag.hh
--- a/src/arch/arm/linux/atag.hh        Fri Mar 09 09:59:25 2012 -0500
+++ b/src/arch/arm/linux/atag.hh        Fri Mar 09 09:59:26 2012 -0500
@@ -156,7 +156,10 @@
 
         delete[] storage;
         storage = new uint32_t[size()];
-
+        // Initialize the last byte of memory here beacuse it might be slightly
+        // longer than needed and mis-speculation of the NULL in the O3 CPU can
+        // change stats ever so slightly when that happens.
+        storage[size() - 1] = 0;
         strcpy((char*)&storage[2] , s.c_str());
     }
     AtagCmdline()
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to