rt: Don't limit the amount of stack available during unwinding. Closes #2144

This commit is contained in:
Brian Anderson
2012-04-09 15:26:41 -07:00
parent a1d59704ed
commit b42c6d07dc
2 changed files with 20 additions and 1 deletions

View File

@@ -514,7 +514,17 @@ rust_task::new_stack(size_t requested_sz) {
if (total_stack_sz + rust_stk_sz > kernel->env->max_stack_size) {
LOG_ERR(this, task, "task %" PRIxPTR " ran out of stack", this);
fail();
if (!unwinding) {
fail();
} else {
// FIXME: Because we have landing pads that may need more
// stack than normally allowed we have to go allow the stack
// to grow unbounded during unwinding. Would be nice to
// have a different solution - maybe just double the limit.
LOG_ERR(this, task, "task %" PRIxPTR " has blown its stack "
"budget but we are unwinding so growing the stack "
"anyway");
}
}
size_t sz = rust_stk_sz + RED_ZONE_SIZE;