RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v5]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Thu Mar 24 18:19:12 UTC 2022
On Thu, 24 Mar 2022 13:00:12 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Drop redundant javadoc statements re. handling of nulls
>> (handling of nulls is specified once and for all in the package javadoc)
>
> src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 1071:
>
>> 1069: sessionImpl.checkValidStateSlow();
>> 1070: if (offset < 0) throw new IllegalArgumentException("Requested bytes offset must be >= 0.");
>> 1071: if (size < 0) throw new IllegalArgumentException("Requested bytes size must be >= 0.");
>
> The javadoc also says that IAE will be thrown if `offset + size < 0` I think to guard against overflow, but I don't see that checked here. Is it missing?
`mapInternal` in FileChannelImpl takes care of that for both flavors of `map`
-------------
PR: https://git.openjdk.java.net/jdk/pull/7888
More information about the security-dev
mailing list