RFR: 8289687: [JVMCI] bug in HotSpotResolvedJavaMethodImpl.equals

Doug Simon dnsimon at openjdk.org
Tue Jul 5 07:18:33 UTC 2022


On Mon, 4 Jul 2022 12:30:57 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> A bug[1] slipped in with [JDK-8289094](https://bugs.openjdk.org/browse/JDK-8289094) that broke `HotSpotResolvedJavaMethodImpl.equals`.This PR fixes and adds a test for it. The test was added to `TestResolvedJavaMethod` which was disabled (see [JDK-8249621](https://bugs.openjdk.org/browse/JDK-8249621)). This test class has been re-enabled and the 2 other failing tests in it (`canBeStaticallyBoundTest` and `asStackTraceElementTest`) have been fixed.

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java line 169:

> 167:         if (obj instanceof HotSpotResolvedJavaMethodImpl) {
> 168:             HotSpotResolvedJavaMethodImpl that = (HotSpotResolvedJavaMethodImpl) obj;
> 169:             return that.getMethodPointer() == getMethodPointer();

This is the actual bug fix.

-------------

PR: https://git.openjdk.org/jdk/pull/9364


More information about the hotspot-compiler-dev mailing list