Skip to content
Snippets Groups Projects
Commit 48c3d271 authored by Simon Marlow's avatar Simon Marlow Committed by pcapriotti
Browse files

Fix crash with tiny initial stack size (#5993)

MERGED from commit 5eabdc16
parent a73d0a21
No related merge requests found
......@@ -66,8 +66,8 @@ createThread(Capability *cap, nat size)
/* sched_mutex is *not* required */
/* catch ridiculously small stack sizes */
if (size < MIN_STACK_WORDS + sizeofW(StgStack)) {
size = MIN_STACK_WORDS + sizeofW(StgStack);
if (size < MIN_STACK_WORDS + sizeofW(StgStack) + sizeofW(StgTSO)) {
size = MIN_STACK_WORDS + sizeofW(StgStack) + sizeofW(StgTSO);
}
/* The size argument we are given includes all the per-thread
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment