rt: Various tweaks to make __morestack unwinding work on linux

When unwinding through __morestack the stack limit in the TLS is invalidated
and must be reset. Instead of actually landing at __morestack we're
just going to make all our Rust landing pads call upcall_reset_stack_limit,
which will find the stack segment that corresponds to the current stack
pointer and put the limit in the TLS.

Also massively expand the stack segment red zone to make more room for the
dynamic linker. Will fix in the future.
This commit is contained in:
Brian Anderson
2011-12-06 16:26:47 -08:00
parent a1b215aea1
commit 9a738fd61d
10 changed files with 65 additions and 6 deletions

View File

@@ -200,6 +200,7 @@ rust_task : public kernel_owned<rust_task>, rust_cond
void *new_stack(size_t stk_sz, void *args_addr, size_t args_sz);
void del_stack();
void record_stack_limit();
void reset_stack_limit();
};
//