[foreign-memaccess+abi] RFR: 8266371: Memory segment bound check fails because of small segment optimizations [v3]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Apr 30 15:15:31 UTC 2021
> 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:
Add comment in test
-------------
Changes:
- all: https://git.openjdk.java.net/panama-foreign/pull/524/files
- new: https://git.openjdk.java.net/panama-foreign/pull/524/files/6f9d3754..568c2169
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=524&range=02
- incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=524&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/524.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/524/head:pull/524
PR: https://git.openjdk.java.net/panama-foreign/pull/524
More information about the panama-dev
mailing list