diff options
author | Andrew Waterman <andrew@sifive.com> | 2022-09-01 20:23:16 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2022-09-01 20:23:16 -0700 |
commit | 4b0e9c165890fc9fe17114591f6de9b707f7ffb2 (patch) | |
tree | 74371d2846efcab12671877b5250c613ca7d492e | |
parent | d685520fed95e6518d6c2174ae51310292b891fe (diff) | |
download | riscv-isa-sim-increase-stack-size.zip riscv-isa-sim-increase-stack-size.tar.gz riscv-isa-sim-increase-stack-size.tar.bz2 |
Substantially increase context_t stack sizeincrease-stack-size
It's nearly free to do so, because it's just virtual address space.
@davidbiancolin recently fell into this pit when using context_t with VCS.
-rw-r--r-- | fesvr/context.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fesvr/context.cc b/fesvr/context.cc index ca73813..1dceeec 100644 --- a/fesvr/context.cc +++ b/fesvr/context.cc @@ -49,7 +49,7 @@ void context_t::init(void (*f)(void*), void* a) #ifdef USE_UCONTEXT getcontext(context.get()); context->uc_link = creator->context.get(); - context->uc_stack.ss_size = 64*1024; + context->uc_stack.ss_size = 1024 * 1024; context->uc_stack.ss_sp = new void*[context->uc_stack.ss_size/sizeof(void*)]; #ifndef GLIBC_64BIT_PTR_BUG makecontext(context.get(), (void(*)(void))&context_t::wrapper, 1, this); |