Matthew Poremba has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/30394 )

Change subject: sim: Initialize stackSize and stackMin in MemState
......................................................................

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
---
M src/sim/mem_state.cc
1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/src/sim/mem_state.cc b/src/sim/mem_state.cc
index bfee9da..bcfab78 100644
--- a/src/sim/mem_state.cc
+++ b/src/sim/mem_state.cc
@@ -43,7 +43,8 @@
                    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)
 {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/30394
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: I9f9316734f4bf1f773fc538922e83b867731c684
Gerrit-Change-Number: 30394
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.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