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>
Addr mmap_end)
: _ownerProcess(owner),
_pageBytes(owner->system->getPageBytes()), _brkPoint(brk_point),
- _stackBase(stack_base), _maxStackSize(max_stack_size),
+ _stackBase(stack_base), _stackSize(max_stack_size),
+ _maxStackSize(max_stack_size), _stackMin(stack_base - max_stack_size),
_nextThreadStackBase(next_thread_stack_base),
_mmapEnd(mmap_end), _endBrkPoint(brk_point)
{