RFR: 8284877: Check type compatibility before looking up method from receiver's vtable [v2]
    Yi Yang 
    yyang at openjdk.org
       
    Mon Jul  3 02:27:07 UTC 2023
    
    
  
On Mon, 3 Jul 2023 02:12:36 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > I mean, users constructs object by JNI and crash when interpreting odpsFileStatus.getPath().toString(), odpsFileStatus.getPath().toString() is not a JNI call.
> 
> Sorry I don't understand what you are referring to. Java code is checked by bytecode verification. If you are using Unsafe then it is up to you to use it correctly just like JNI.
Yes, the problem is Java code `odpsFileStatus.getPath().toString()` works even if `odpsFileStatus.getPath()` is String object (it was decalred as xxx.Path)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/8241#issuecomment-1617125429
    
    
More information about the hotspot-dev
mailing list