Yu-hsin Wang has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/57730 )

Change subject: base: zero initialize the underlying storage of bitunion
......................................................................

base: zero initialize the underlying storage of bitunion

To make the simulation result deterministic, we should make sure
everything is initiaized in a good state. In addition, this change
wouldn't break anything, since the original initial value is a random
value.

Change-Id: Icbed36b3fa6751cbda63e84443eaab6d865d9bd6
---
M src/base/bitunion.hh
1 file changed, 18 insertions(+), 1 deletion(-)



diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 92d747c..1fc0a94 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -261,7 +261,10 @@

         BitUnionOperators(const BitUnionOperators &) = default;

-        BitUnionOperators() {}
+        BitUnionOperators()
+        {
+            Base::__storage = {};
+        }

         //Conversion operators.
         operator const typename Base::__StorageType () const

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57730
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Icbed36b3fa6751cbda63e84443eaab6d865d9bd6
Gerrit-Change-Number: 57730
Gerrit-PatchSet: 1
Gerrit-Owner: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to