projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eaa994e
)
ARM: Fix valgrind reported error on O3 that was causing minor stats changes.
author
Ali Saidi
<Ali.Saidi@ARM.com>
Fri, 9 Mar 2012 14:59:26 +0000
(09:59 -0500)
committer
Ali Saidi
<Ali.Saidi@ARM.com>
Fri, 9 Mar 2012 14:59:26 +0000
(09:59 -0500)
src/arch/arm/linux/atag.hh
patch
|
blob
|
history
diff --git
a/src/arch/arm/linux/atag.hh
b/src/arch/arm/linux/atag.hh
index b7c37dffdc0b2a1bef31b424527a4996ca955a8a..71271dac29a9501722afed239c212f940c53fadb 100644
(file)
--- a/
src/arch/arm/linux/atag.hh
+++ b/
src/arch/arm/linux/atag.hh
@@
-156,7
+156,10
@@
class AtagCmdline : public AtagHeader
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()