arch-arm: Fix WalkerState,Descriptors default constructor
Those POD strutures are not initializing all members at construction. This could lead to undefined behaviour Change-Id: Iaa8afb126382b6bfbef686883a026262f24d5ca1 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Reviewed-by: Javier Setoain <javier.setoain@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19149 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -130,7 +130,10 @@ TableWalker::getPort(const std::string &if_name, PortID idx)
|
||||
TableWalker::WalkerState::WalkerState() :
|
||||
tc(nullptr), aarch64(false), el(EL0), physAddrRange(0), req(nullptr),
|
||||
asid(0), vmid(0), isHyp(false), transState(nullptr),
|
||||
vaddr(0), vaddr_tainted(0), isWrite(false), isFetch(false), isSecure(false),
|
||||
vaddr(0), vaddr_tainted(0),
|
||||
sctlr(0), scr(0), cpsr(0), tcr(0),
|
||||
htcr(0), hcr(0), vtcr(0),
|
||||
isWrite(false), isFetch(false), isSecure(false),
|
||||
secureLookup(false), rwTable(false), userTable(false), xnTable(false),
|
||||
pxnTable(false), stage2Req(false),
|
||||
stage2Tran(nullptr), timing(false), functional(false),
|
||||
|
||||
@@ -67,6 +67,8 @@ class TableWalker : public ClockedObject
|
||||
|
||||
class DescriptorBase {
|
||||
public:
|
||||
DescriptorBase() : lookupLevel(L0) {}
|
||||
|
||||
/** Current lookup level for this descriptor */
|
||||
LookupLevel lookupLevel;
|
||||
|
||||
@@ -382,6 +384,8 @@ class TableWalker : public ClockedObject
|
||||
Page
|
||||
};
|
||||
|
||||
LongDescriptor() : data(0), _dirty(false) {}
|
||||
|
||||
/** The raw bits of the entry */
|
||||
uint64_t data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user