Skip to content

Commit be50cdd

Browse files
committed
rt: Add room for the new fill slot when resizing interior vectors
1 parent e192755 commit be50cdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rt/rust_upcall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ upcall_ivec_resize(rust_task *task,
567567

568568
size_t new_alloc = next_power_of_two(newsz);
569569
rust_ivec_heap *new_heap_part = (rust_ivec_heap *)
570-
task->realloc(v->payload.ptr, new_alloc);
570+
task->realloc(v->payload.ptr, new_alloc + sizeof(size_t));
571571

572572
new_heap_part->fill = newsz;
573573
v->alloc = new_alloc;

0 commit comments

Comments
 (0)