Skip to content

Commit 0e89a89

Browse files
committed
---
yaml --- r: 132526 b: refs/heads/dist-snap c: bf76e00 h: refs/heads/master v: v3
1 parent 74a8a56 commit 0e89a89

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 457a3c991d79b971be07fce75f9d0c12848fb37c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: bf420e58c2f88c8f37f83aaf947e7abba1cd7f79
9+
refs/heads/dist-snap: bf76e0023114fb47cc8fc766dc2f3d5db8c696a2
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libgreen/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ impl Context {
105105
// invalid for the current task. Lucky for us `rust_swap_registers`
106106
// is a C function so we don't have to worry about that!
107107
match in_context.stack_bounds {
108-
Some((lo, hi)) => stack::record_stack_bounds(lo, hi),
108+
Some((lo, hi)) => stack::record_stack_bounds_green(lo, hi),
109109
// If we're going back to one of the original contexts or
110110
// something that's possibly not a "normal task", then reset
111111
// the stack limit to 0 to make morestack never fail
112-
None => stack::record_stack_bounds(0, uint::MAX),
112+
None => stack::record_stack_bounds_green(0, uint::MAX),
113113
}
114114
rust_swap_registers(out_regs, in_regs)
115115
}

branches/dist-snap/src/librustrt/stack.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extern fn stack_exhausted() {
125125
}
126126

127127
#[inline(always)]
128-
pub unsafe fn record_stack_bounds(stack_lo: uint, stack_hi: uint) {
128+
pub unsafe fn record_stack_bounds_green(stack_lo: uint, stack_hi: uint) {
129129
// When the old runtime had segmented stacks, it used a calculation that was
130130
// "limit + RED_ZONE + FUDGE". The red zone was for things like dynamic
131131
// symbol resolution, llvm function calls, etc. In theory this red zone
@@ -154,6 +154,11 @@ pub unsafe fn record_stack_bounds(stack_lo: uint, stack_hi: uint) {
154154
}
155155
}
156156

157+
#[inline(always)]
158+
pub unsafe fn record_stack_bounds(stack_lo: uint, _stack_hi: uint) {
159+
record_sp_limit(stack_lo + RED_ZONE);
160+
}
161+
157162
/// Records the current limit of the stack as specified by `end`.
158163
///
159164
/// This is stored in an OS-dependent location, likely inside of the thread

0 commit comments

Comments
 (0)