File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,16 @@ struct stk_seg {
13
13
uint8_t data[];
14
14
};
15
15
16
+ void
17
+ add_stack_canary (stk_seg *stk);
18
+
16
19
template <class T >
17
20
stk_seg *
18
21
create_stack (T allocer, size_t sz) {
19
22
size_t total_sz = sizeof (stk_seg) + sz;
20
23
stk_seg *stk = (stk_seg *)allocer->malloc (total_sz, " stack" );
21
24
memset (stk, 0 , sizeof (stk_seg));
25
+ add_stack_canary (stk);
22
26
stk->end = (uintptr_t ) &stk->data [sz];
23
27
return stk;
24
28
}
@@ -35,9 +39,6 @@ config_valgrind_stack(stk_seg *stk);
35
39
void
36
40
unconfig_valgrind_stack (stk_seg *stk);
37
41
38
- void
39
- add_stack_canary (stk_seg *stk);
40
-
41
42
void
42
43
check_stack_canary (stk_seg *stk);
43
44
Original file line number Diff line number Diff line change @@ -593,7 +593,6 @@ rust_task::new_stack(size_t requested_sz) {
593
593
size_t sz = rust_stk_sz + RED_ZONE_SIZE;
594
594
stk_seg *new_stk = create_stack (this , sz);
595
595
LOGPTR (thread, " new stk" , (uintptr_t )new_stk);
596
- add_stack_canary (new_stk);
597
596
new_stk->prev = NULL ;
598
597
new_stk->next = stk;
599
598
LOGPTR (thread, " stk end" , new_stk->end );
You can’t perform that action at this time.
0 commit comments