[foreign] RFR : Move array-like methods from Pointer to Array
Jorn Vernee
jbvernee at xs4all.nl
Mon Nov 19 16:01:34 UTC 2018
>> But overall I think we should strive for the 'no VM crashes if you are
>> only using the safe API' (although we don't have to get there in one
>> step).
As an amendment;
I think the API is inherently unsafe, unless you strictly stay on the
Java side, but that kind of defeats the point.
I believe the only way to make it safe is to dis-allow de-referencing
any native pointers (both internally and externally), that way when you
do get a crash it will be on the native side, because the native code is
doing something wrong.
FWIW the ability to crash the VM already exists with JNI, it's just only
possible to do in native code (as far as I know).
Jorn
More information about the panama-dev
mailing list