Integrated: 8300590: [JVMCI] BytecodeFrame.equals is broken

Doug Simon dnsimon at openjdk.org
Sat Jan 21 11:40:12 UTC 2023


On Wed, 18 Jan 2023 21:39:57 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> `BytecodeFrame.equals` returns true even when the frames are found to be not equal: https://github.com/openjdk/jdk/blob/7bf0d1465e73d83aae30f1cd9fd318af9e9c1b70/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java#L375
> 
> This PR fixes that, adds a test and improves both `BytecodeFrame.hashCode` and `BytecodeFrame.equals` to take all fields into account.
> 
> Given the nature of the bug in `BytecodeFrame.equals` that this PR fixes, it's pretty clear that `BytecodeFrame` has never been (reliably) used as a key in a map.

This pull request has now been integrated.

Changeset: 06394ee8
Author:    Doug Simon <dnsimon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/06394ee8b110fe8e37a3b9e582f5dfbf225a3d89
Stats:     145 lines in 2 files changed: 129 ins; 8 del; 8 mod

8300590: [JVMCI] BytecodeFrame.equals is broken

Reviewed-by: adinn, dlong

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

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


More information about the hotspot-compiler-dev mailing list