auto merge of #7033 : influenza/rust/rust-7022, r=graydon
This commit fixes #7022 - I've added an additional check to ensure that stk is not null before dereferencing it to get it's next element, assigning NULL if it is itself NULL.
This commit is contained in:
commit
1175e94de3
|
@ -587,6 +587,7 @@ rust_task::cleanup_after_turn() {
|
|||
// stack and false otherwise.
|
||||
bool
|
||||
rust_task::new_big_stack() {
|
||||
assert(stk);
|
||||
// If we have a cached big stack segment, use it.
|
||||
if (big_stack) {
|
||||
// Check to see if we're already on the big stack.
|
||||
|
@ -616,8 +617,7 @@ rust_task::new_big_stack() {
|
|||
if (big_stack->next)
|
||||
big_stack->next->prev = big_stack;
|
||||
big_stack->prev = stk;
|
||||
if (stk)
|
||||
stk->next = big_stack;
|
||||
stk->next = big_stack;
|
||||
|
||||
stk = big_stack;
|
||||
|
||||
|
|
Loading…
Reference in New Issue