[foreign-memaccess+abi] RFR: 8266371: Memory segment bound check fails because of small segment optimizations [v2]
Athijegannathan Sundararajan
sundar at openjdk.java.net
Fri Apr 30 15:05:06 UTC 2021
On Fri, 30 Apr 2021 14:51:20 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> The optimization for small memory segment bound check does not take into account numeric overflow. As a result, the bounds check does not detect big long values which, when casted back to int values appear to be within the segment's bounds.
>>
>> The fix is to avoid the optimized bound check routine if the offset/length at which the segment is accessed is bigger than Integer.MAX_VALUE.
>>
>> Benchmarks do not seem affected by this change (I'll post results in a separate comment).
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>
> Address negative overflow as well
Additional changes are fine.
-------------
Marked as reviewed by sundar (Committer).
PR: https://git.openjdk.java.net/panama-foreign/pull/524
More information about the panama-dev
mailing list