Skip to content

Commit

Permalink
auto merge of #6081 : brson/rust/out-of-stack, r=thestinger
Browse files Browse the repository at this point in the history
People hit the recursion depth limit too often, it's not possible
to unwind reliably from out-of-stack.

Issues #3555, #3695
  • Loading branch information
bors committed Apr 27, 2013
2 parents 9f11886 + 149047e commit 88dd53a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 86 deletions.
2 changes: 1 addition & 1 deletion src/rt/rust_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ get_max_stk_size() {
return strtol(maxsz, NULL, 0);
}
else {
return 1024*1024*8;
return 1024*1024*1024;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/rt/rust_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,11 @@ rust_task::new_stack(size_t requested_sz) {
// arbitrarily selected as 2x the maximum stack size.
if (!unwinding && used_stack > max_stack) {
LOG_ERR(this, task, "task %" PRIxPTR " ran out of stack", this);
fail();
abort();
} else if (unwinding && used_stack > max_stack * 2) {
LOG_ERR(this, task,
"task %" PRIxPTR " ran out of stack during unwinding", this);
fail();
abort();
}

size_t sz = rust_stk_sz + RED_ZONE_SIZE;
Expand Down
19 changes: 0 additions & 19 deletions src/test/run-fail/issue-2144.rs

This file was deleted.

25 changes: 0 additions & 25 deletions src/test/run-fail/out-of-stack-managed-box.rs

This file was deleted.

21 changes: 0 additions & 21 deletions src/test/run-fail/out-of-stack-owned-box.rs

This file was deleted.

18 changes: 0 additions & 18 deletions src/test/run-fail/too-much-recursion.rs

This file was deleted.

0 comments on commit 88dd53a

Please sign in to comment.