sim: Initialize stackSize and stackMin in MemState
authorMatthew Poremba <matthew.poremba@amd.com>
Wed, 17 Jun 2020 23:06:23 +0000 (18:06 -0500)
committerMatthew Poremba <matthew.poremba@amd.com>
Fri, 19 Jun 2020 14:19:36 +0000 (14:19 +0000)
commit3ca404da175a66e0b958165ad75eb5f54cb5e772
tree05450e4b28b99b248d0776de63abb93a759879cd
parent562498f6c4dceeacadb996681844068854e8887e
sim: Initialize stackSize and stackMin in MemState

Initialize _stackSize and _stackMin to the maximum stack size values.
The are setup in each arch's Process::initState and may be uninitialized
until then. If a stack fixup occurs before these are setup, addresses
which are not in the stack might be allocated on the stack. This
prevents that until they are initialized in Process::initState. If an
access occurs before that with these initial values, the stack fixup
will simply allocate a page of memory in the stack space. However, it
will not print the typical info messages about growing the stack during
this time.

Change-Id: I9f9316734f4bf1f773fc538922e83b867731c684
JIRA: https://gem5.atlassian.net/browse/GEM5-629
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30394
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/mem_state.cc