[foreign-memaccess+abi] RFR: 8266371: Memory segment bound check fails because of small segment optimizations
Athijegannathan Sundararajan
sundar at openjdk.java.net
Fri Apr 30 14:24:22 UTC 2021
On Fri, 30 Apr 2021 14:14:57 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).
LGTM
-------------
Marked as reviewed by sundar (Committer).
PR: https://git.openjdk.java.net/panama-foreign/pull/524
More information about the panama-dev
mailing list