Skip to content

Commit b173ffc

Browse files
committed
---
yaml --- r: 6875 b: refs/heads/master c: 6443a7b h: refs/heads/master i: 6873: 11ce6a6 6871: 26ed7f2 v: v3
1 parent a1a3244 commit b173ffc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3bc4da96f16298c0575ae82904a2552f7ee1547c
2+
refs/heads/master: 6443a7b513eb41448dd22cc7c042c59b088aff18

trunk/src/rt/rust_upcall.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ call_upcall_on_c_stack(void *args, void *fn_ptr) {
4141
do_sanity_check(task);
4242
rust_scheduler *sched = task->sched;
4343
sched->c_context.call_shim_on_c_stack(args, fn_ptr);
44-
do_sanity_check(task);
4544
}
4645

4746
extern "C" void record_sp(void *limit);
@@ -72,7 +71,6 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
7271

7372
task = rust_scheduler::get_task();
7473
task->record_stack_limit();
75-
do_sanity_check(task);
7674
}
7775

7876
/**********************************************************************/
@@ -411,6 +409,10 @@ upcall_vec_push(rust_vec** vp, type_desc* elt_ty, void* elt) {
411409
// because this upcall calls take glue
412410
s_vec_push_args args = {vp, elt_ty, elt};
413411
upcall_s_vec_push(&args);
412+
413+
// Do the stack check to make sure this op, on the Rust stack, is behaving
414+
rust_task *task = rust_scheduler::get_task();
415+
task->check_stack_canary();
414416
}
415417

416418
/**********************************************************************
@@ -645,7 +647,7 @@ upcall_reset_stack_limit() {
645647
rust_task *task = rust_scheduler::get_task();
646648
do_sanity_check(task);
647649
task->reset_stack_limit();
648-
do_sanity_check(task);
650+
task->check_stack_canary();
649651
}
650652

651653
//

0 commit comments

Comments
 (0)