test: Test hitting the dynamic linker in the red zone

This commit is contained in:
Brian Anderson 2011-12-05 17:20:59 -08:00
parent 3b8bfaf534
commit a731f165df
4 changed files with 91 additions and 3 deletions

View file

@ -273,6 +273,12 @@ debug_ptrcast(type_desc *from_ty,
return ptr;
}
extern "C" CDECL void *
debug_get_stk_seg() {
rust_task *task = rust_scheduler::get_task();
return task->stk;
}
extern "C" CDECL rust_vec*
rust_list_files(rust_str *path) {
rust_task *task = rust_scheduler::get_task();

View file

@ -222,7 +222,7 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
// FIXME (1226) - The shim functions generated by rustc contain the
// morestack prologue, so we need to let them know they have enough
// stack.
//record_sp(0);
record_sp(0);
rust_scheduler *sched = task->sched;
try {
@ -232,8 +232,8 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
//task->record_stack_limit();
throw;
}
//task = rust_scheduler::get_task();
//task->record_stack_limit();
task = rust_scheduler::get_task();
task->record_stack_limit();
}
struct rust_new_stack2_args {

View file

@ -8,6 +8,7 @@ del_port
debug_ptrcast
debug_tag
debug_tydesc
debug_get_stk_seg
do_gc
drop_task
get_port_id