RFR: 8284877: Check type compatibility before looking up method from receiver's vtable [v2]
    Yi Yang 
    yyang at openjdk.org
       
    Thu Jun 15 02:06:22 UTC 2023
    
    
  
On Thu, 15 Jun 2023 01:41:10 GMT, David Holmes <dholmes at openjdk.org> wrote:
> JNI also places responsibility for correct usage on the programmer.
But compared to the crash caused by Unsafe misuse, the incorrect JNI usage in this example produced the correct result and was not detected by the VM. It should detect such errors, shouldn't it?
Furthermore, it is natural to check the receiver type, method modifiers, and whether the method is linked before calling a virtual function.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/8241#issuecomment-1592228279
    
    
More information about the hotspot-runtime-dev
mailing list