-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: core-libs
We could enable additional runtime checks in the FFM-api, based on a system property (e.g. -Djava.lang.foreign.CHECK=true).
This would be similar to -Xcheck:jni.
Some checks we could possibly add are:
- An additional NULL check on the access memory segment when doing a memory access. This could help to make unsafe memory accesses (as a result of using a restricted method) a little bit safer.
The idea is that users can optionally turn on additional checks, that would normally be turned off for performance reasons.
This would be similar to -Xcheck:jni.
Some checks we could possibly add are:
- An additional NULL check on the access memory segment when doing a memory access. This could help to make unsafe memory accesses (as a result of using a restricted method) a little bit safer.
The idea is that users can optionally turn on additional checks, that would normally be turned off for performance reasons.
- relates to
-
JDK-8321466 SIGSEGV when reading from a MemorySegment when address is 0
-
- Closed
-