RFR: 8300590: [JVMCI] BytecodeFrame.equals is broken [v3]

Doug Simon dnsimon at openjdk.org
Fri Jan 20 15:23:25 UTC 2023


> `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.

Doug Simon has updated the pull request incrementally with one additional commit since the last revision:

  fix test failure when assertions are enabled

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/12084/files
  - new: https://git.openjdk.org/jdk/pull/12084/files/3b3a9d53..2e95375d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12084&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12084&range=01-02

  Stats: 12 lines in 1 file changed: 0 ins; 0 del; 12 mod
  Patch: https://git.openjdk.org/jdk/pull/12084.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12084/head:pull/12084

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


More information about the hotspot-compiler-dev mailing list