Skip to content

Commit e15e52f

Browse files
committed
---
yaml --- r: 8176 b: refs/heads/snap-stage3 c: 8fe506b h: refs/heads/master v: v3
1 parent 0928410 commit e15e52f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ea76d3f454c53623fdd957b79a6652c7d1f2dcc8
4+
refs/heads/snap-stage3: 8fe506bdca714fe2b8b005b1d190091d221c4044
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/rt/rust_stack.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ template <class T>
1717
stk_seg *
1818
create_stack(T allocer, size_t sz) {
1919
size_t total_sz = sizeof(stk_seg) + sz;
20-
return (stk_seg *)allocer->malloc(total_sz, "stack");
20+
stk_seg *stk = (stk_seg *)allocer->malloc(total_sz, "stack");
21+
memset(stk, 0, sizeof(stk_seg));
22+
stk->end = (uintptr_t) &stk->data[sz];
23+
return stk;
2124
}
2225

2326
template <class T>

branches/snap-stage3/src/rt/rust_task.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,9 @@ rust_task::new_stack(size_t requested_sz) {
584584
size_t sz = rust_stk_sz + RED_ZONE_SIZE;
585585
stk_seg *new_stk = create_stack(this, sz);
586586
LOGPTR(thread, "new stk", (uintptr_t)new_stk);
587-
memset(new_stk, 0, sizeof(stk_seg));
588587
add_stack_canary(new_stk);
589588
new_stk->prev = NULL;
590589
new_stk->next = stk;
591-
new_stk->end = (uintptr_t) &new_stk->data[rust_stk_sz + RED_ZONE_SIZE];
592590
LOGPTR(thread, "stk end", new_stk->end);
593591

594592
stk = new_stk;

0 commit comments

Comments
 (0)