diff --git a/3rdparty/tvm-ffi b/3rdparty/tvm-ffi index b03cc7845ae9..43ffe571bfef 160000 --- a/3rdparty/tvm-ffi +++ b/3rdparty/tvm-ffi @@ -1 +1 @@ -Subproject commit b03cc7845ae92060881e14c4f50a4b6da4d9f982 +Subproject commit 43ffe571bfef2a3f2c2dc254ca3e5dc10e093daa diff --git a/web/src/memory.ts b/web/src/memory.ts index 94ecb4e15afa..c57f83854df0 100644 --- a/web/src/memory.ts +++ b/web/src/memory.ts @@ -175,7 +175,8 @@ export class Memory { * @returns The object type index. */ loadObjectTypeIndex(objectHandle: Pointer): number { - return this.loadI32(objectHandle); + // The object layout is [ref_counter (i64), type_index (i32), ...]. + return this.loadI32(objectHandle + SizeOf.I64); } /** * Load the type key from the type info pointer.