Skip to content

Commit fc064f4

Browse files
committed
use uint64_t when adjusting stack ptr
1 parent 711a3b0 commit fc064f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rt/arch/x86_64/context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class context {
4646
// function being called causes the task to fail, then we have to avoid
4747
// leaking space on the C stack.
4848
inline void *alloc_stack(size_t nbytes) {
49-
uint32_t bot = regs.data[RUSTRT_RSP];
50-
uint32_t top = align_down(bot - nbytes);
49+
uint64_t bot = regs.data[RUSTRT_RSP];
50+
uint64_t top = align_down(bot - nbytes);
5151

5252
#ifdef HAVE_VALGRIND
5353
(void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);

0 commit comments

Comments
 (0)