File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,11 @@ impl Context {
105
105
// invalid for the current task. Lucky for us `rust_swap_registers`
106
106
// is a C function so we don't have to worry about that!
107
107
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) ,
109
109
// If we're going back to one of the original contexts or
110
110
// something that's possibly not a "normal task", then reset
111
111
// 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 ) ,
113
113
}
114
114
rust_swap_registers ( out_regs, in_regs)
115
115
}
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ extern fn stack_exhausted() {
125
125
}
126
126
127
127
#[ 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 ) {
129
129
// When the old runtime had segmented stacks, it used a calculation that was
130
130
// "limit + RED_ZONE + FUDGE". The red zone was for things like dynamic
131
131
// 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) {
154
154
}
155
155
}
156
156
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
+
157
162
/// Records the current limit of the stack as specified by `end`.
158
163
///
159
164
/// This is stored in an OS-dependent location, likely inside of the thread
You can’t perform that action at this time.
0 commit comments