From 69762e272edc586bde345229cc54b7999b795be9 Mon Sep 17 00:00:00 2001 From: Nicholas Mosier Date: Thu, 29 Feb 2024 08:15:43 -0800 Subject: [PATCH] sim-se, arch-x86: initialize max stack size from parameter (#892) Initialize x86 process' max stack size to the value given in the process params, rather than hard-coding it to 8 MB, which made it impossible to run x86 programs requiring more than 8 MB of stack. Change-Id: I0b17fe60b016b1e4a82d704ef7ad367974ea6a08 --- src/arch/x86/process.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc index 71615a862f..9af685dac6 100644 --- a/src/arch/x86/process.cc +++ b/src/arch/x86/process.cc @@ -112,7 +112,7 @@ X86_64Process::X86_64Process(const ProcessParams ¶ms, Addr brk_point = roundUp(image.maxAddr(), PageBytes); Addr stack_base = 0x7FFFFFFFF000ULL; - Addr max_stack_size = 8 * 1024 * 1024; + Addr max_stack_size = params.maxStackSize; Addr next_thread_stack_base = stack_base - max_stack_size; Addr mmap_end = 0x7FFFF7FFF000ULL;