@@ -27,18 +27,12 @@ check_stack_alignment() __attribute__ ((aligned (16)));
2727static void check_stack_alignment () { }
2828#endif
2929
30- static inline void
31- do_sanity_check (rust_task *task) {
32- check_stack_alignment ();
33- task->check_stack_canary ();
34- }
35-
3630#define UPCALL_SWITCH_STACK (A, F ) call_upcall_on_c_stack((void *)A, (void *)F)
3731
3832inline void
3933call_upcall_on_c_stack (void *args, void *fn_ptr) {
34+ check_stack_alignment ();
4035 rust_task *task = rust_scheduler::get_task ();
41- do_sanity_check (task);
4236 rust_scheduler *sched = task->sched ;
4337 sched->c_context .call_shim_on_c_stack (args, fn_ptr);
4438}
@@ -55,7 +49,6 @@ extern "C" void record_sp(void *limit);
5549extern " C" CDECL void
5650upcall_call_shim_on_c_stack (void *args, void *fn_ptr) {
5751 rust_task *task = rust_scheduler::get_task ();
58- do_sanity_check (task);
5952
6053 // FIXME (1226) - The shim functions generated by rustc contain the
6154 // morestack prologue, so we need to let them know they have enough
@@ -645,9 +638,7 @@ upcall_del_stack() {
645638extern " C" CDECL void
646639upcall_reset_stack_limit () {
647640 rust_task *task = rust_scheduler::get_task ();
648- do_sanity_check (task);
649641 task->reset_stack_limit ();
650- task->check_stack_canary ();
651642}
652643
653644//
0 commit comments