RFR: 8323243: JNI invocation of an abstract instance method corrupts the stack [v2]
David Holmes
dholmes at openjdk.org
Wed Jan 10 22:03:58 UTC 2024
On Wed, 10 Jan 2024 15:25:30 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/jni/abstractMethod/TestJNIAbstractMethod.java line 51:
>>
>>> 49:
>>> 50: public static void main(String[] args) {
>>> 51: AbstractMethod obj = new AbstractMethod();
>>
>> So this doesn't result in an exception when you new this class? Can you call this AbstractMethodClass or something like that?
>
> 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`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17337#discussion_r1448031844
More information about the hotspot-runtime-dev
mailing list