RFR: 8323243: JNI invocation of an abstract instance method corrupts the stack [v3]

David Holmes dholmes at openjdk.org
Thu Jan 11 07:11:57 UTC 2024


On Wed, 10 Jan 2024 21:57:42 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> It would also be good to have a positive test here: calling the method from plain Java should throw AME as well.
>
> The class itself is not marked abstract so you can create instances of it. The VM spec does not require that a non-abstract class have no abstract methods.
> 
> I have renamed to `AbstractMethodClass`.

> It would also be good to have a positive test here: calling the method from plain Java should throw AME as well.

Finally found this comment! No idea where it was hiding.

Okay I've added a direct Java test too (not sure I'd call it a "positive test" though : ) ). I actually thought it may not compile but it seems compile time method resolution doesn't care about abstract (which I can understand for interface invocations but not classes).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17337#discussion_r1448380371


More information about the hotspot-runtime-dev mailing list