[foreign-memaccess+abi] Integrated: 8266371: Memory segment bound check fails because of small segment optimizations
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Apr 30 15:15:32 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).
This pull request has now been integrated.
Changeset: db8a85d1
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.java.net/panama-foreign/commit/db8a85d10a6477bcf944710b5133b17550358ae4
Stats: 23 lines in 3 files changed: 17 ins; 5 del; 1 mod
8266371: Memory segment bound check fails because of small segment optimizations
Reviewed-by: sundar, chegar
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/524
More information about the panama-dev
mailing list