Skip to content

Commit a85b205

Browse files
committed
actually fix compilation after rebase
1 parent 720b100 commit a85b205

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • crates/wasmtime/src/runtime/vm/gc/enabled

crates/wasmtime/src/runtime/vm/gc/enabled/copying.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,13 @@ unsafe impl GcHeap for CopyingHeap {
792792
length: u32,
793793
layout: &GcArrayLayout,
794794
) -> Result<Result<VMArrayRef, u64>> {
795+
let layout = layout
796+
.layout(length)
797+
.ok_or_else(|| crate::Trap::AllocationTooLarge)?;
798+
795799
let gc_ref = match self.alloc_raw(
796800
VMGcHeader::from_kind_and_index(VMGcKind::ArrayRef, ty),
797-
layout.layout(length),
801+
layout,
798802
)? {
799803
Err(n) => return Ok(Err(n)),
800804
Ok(gc_ref) => gc_ref,

0 commit comments

Comments
 (0)