Adding a function to stdlib to set the min stack size, for programs
that absolutely will not succeed with a large default stack. This should be removed once we have stack grown working. Also updated word-count to succeed under the new test framework.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
// FIXME (issue #151): This should be 0x300; the change here is for
|
||||
// practicality's sake until stack growth is working.
|
||||
size_t g_min_stack_size = 0x300000;
|
||||
|
||||
static size_t get_min_stk_size() {
|
||||
char *stack_size = getenv("RUST_MIN_STACK");
|
||||
@@ -21,7 +22,7 @@ static size_t get_min_stk_size() {
|
||||
return strtol(stack_size, NULL, 0);
|
||||
}
|
||||
else {
|
||||
return 0x300000;
|
||||
return g_min_stack_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user