Skip to content

Commit ebc9f64

Browse files
authored
Debug-assert tables are compatible when copying (#13072)
This shouldn't ever trip but there's also no need to ignore these flags.
1 parent 9418e8e commit ebc9f64

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

crates/wasmtime/src/runtime/vm/table.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,8 +1055,9 @@ impl Table {
10551055
match ty {
10561056
TableElementType::Func => {
10571057
// `funcref` are `Copy`, so just do a mempcy
1058-
let (dst_funcrefs, _lazy_init) = dst_table.funcrefs_mut();
1059-
let (src_funcrefs, _lazy_init) = src_table.funcrefs();
1058+
let (dst_funcrefs, dst_lazy_init) = dst_table.funcrefs_mut();
1059+
let (src_funcrefs, src_lazy_init) = src_table.funcrefs();
1060+
debug_assert_eq!(dst_lazy_init, src_lazy_init);
10601061
dst_funcrefs[dst_range].copy_from_slice(&src_funcrefs[src_range]);
10611062
}
10621063
TableElementType::GcRef => {

0 commit comments

Comments
 (0)