[foreign-memaccess+abi] RFR: 8266626: Check that the target address of a native call is not NULL [v3]

Jorn Vernee jvernee at openjdk.java.net
Mon May 10 13:15:09 UTC 2021


On Mon, 10 May 2021 12:08:54 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>> 
>>  - Merge branch 'foreign-memaccess+abi' into Check_NULL
>>  - - Merge check symbol code
>>    - add missing documentation
>>  - Add tests
>>  - WIP - Add NULL checks for target addresses (need tests)
>
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java line 200:
> 
>> 198:      * @return the downcall method handle.
>> 199:      * @throws IllegalArgumentException in the case of a method type and function descriptor mismatch, or if the symbol
>> 200:      *                                  is {@link MemoryAddress#NULL}
> 
> Is the indentation deliberate? What about NPE?

Yes, the indentation is deliberate.

I'll add the NPE as well, looks like that was missing from before.

-------------

PR: https://git.openjdk.java.net/panama-foreign/pull/530


More information about the panama-dev mailing list