From 6cf2ff3cc4fae38d5de9f0ec67546d92b3f6fb3e Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 13 Sep 2024 13:23:21 +0200 Subject: [PATCH] wasm gc: fix issue in calculating identity hashcode --- .../src/main/java/org/teavm/classlib/java/lang/TObject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java index 10569d90d..5cadc4cc2 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java @@ -257,7 +257,7 @@ public class TObject { } return monitor.id; } else { - identity = WasmGCSupport.nextObjectId(); + identity = WasmGCSupport.nextObjectId() & 0x7ffffff; setWasmGCIdentity(identity); } }