diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-12-20 16:50:54 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-12-20 16:50:54 -0800 |
| commit | cab4da70c8577ee7525fb327e7ae79ef9f9e96e5 (patch) | |
| tree | 0a346624f45d5c12cc9ca409f63491443af6f412 /src/rt/rust_upcall.cpp | |
| parent | a5d48ce28655e9be723b54c0f39b050df177e890 (diff) | |
| download | rust-cab4da70c8577ee7525fb327e7ae79ef9f9e96e5.tar.gz rust-cab4da70c8577ee7525fb327e7ae79ef9f9e96e5.zip | |
rt: Don't check the stack canary on most upcalls
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 8ccd5ddcf8c..4eafb8fcbba 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -27,18 +27,12 @@ check_stack_alignment() __attribute__ ((aligned (16))); static void check_stack_alignment() { } #endif -static inline void -do_sanity_check(rust_task *task) { - check_stack_alignment(); - task->check_stack_canary(); -} - #define UPCALL_SWITCH_STACK(A, F) call_upcall_on_c_stack((void*)A, (void*)F) inline void call_upcall_on_c_stack(void *args, void *fn_ptr) { + check_stack_alignment(); rust_task *task = rust_scheduler::get_task(); - do_sanity_check(task); rust_scheduler *sched = task->sched; sched->c_context.call_shim_on_c_stack(args, fn_ptr); } @@ -55,7 +49,6 @@ extern "C" void record_sp(void *limit); extern "C" CDECL void upcall_call_shim_on_c_stack(void *args, void *fn_ptr) { rust_task *task = rust_scheduler::get_task(); - do_sanity_check(task); // FIXME (1226) - The shim functions generated by rustc contain the // morestack prologue, so we need to let them know they have enough @@ -645,9 +638,7 @@ upcall_del_stack() { extern "C" CDECL void upcall_reset_stack_limit() { rust_task *task = rust_scheduler::get_task(); - do_sanity_check(task); task->reset_stack_limit(); - task->check_stack_canary(); } // |
