RFR: 8350029: Illegal invokespecial interface not caught by verification [v2]

David Holmes dholmes at openjdk.org
Wed Jun 4 21:13:43 UTC 2025


> As described in the JBS problem statement there was a missing verification check for bad `invokespecial` call, though it did result in a runtime exception. That gap has now been closed by checking if the target of the invocation is an interface type, which we can check when the type gets loaded as part of the assignability check.
> 
> The existing code was very difficult to follow so I have added significant commentary in the verifier. I also improved the naming in the assignability checking code to make it easier to follow. Finally, the existing linkage error was using an incorrect error message to describe the problem it was encountering.
> 
> Testing:
>  - new test case
>  - tiers 1-3
> 
> Thanks

David Holmes has updated the pull request incrementally with one additional commit since the last revision:

  Fix new-line at end-of-file

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25538/files
  - new: https://git.openjdk.org/jdk/pull/25538/files/1540b0aa..d3f540cc

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

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/25538.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25538/head:pull/25538

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


More information about the hotspot-runtime-dev mailing list