RFR: 8274548: (fc) FileChannel gathering write fails with IOException "Invalid argument" on macOS 11.6 [v6]
Brian Burkhalter
bpb at openjdk.java.net
Mon Oct 11 15:54:12 UTC 2021
On Sat, 9 Oct 2021 07:17:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8274548: Minor restructuring of get_darwin_version() and writevMax()
>
> src/java.base/unix/native/libnio/ch/IOUtil.c line 216:
>
>> 214: // overflows a 32-bit integer.
>> 215: //
>> 216: int darwin_version = get_darwin_version();
>
> What you would think about dropping the OS version and just return Integer.MAX_VALUE on macOS? That would align with the EINVAL documented in the man page on all versions.
>
> In passing, an inconsistency has kept into the native code. In some places we are using ifdef __APPLE__ and in others ifdef MACOX. We should probably clean this up.
I'm find with dropping the OS version check on macOS and removing the Darwin version function.
I also noticed the inconsistency in the APPLE and MACOSX symbolic constants. There's also another one like ALL_BSD_SOURCE. I don't know whether we consider that redundant as well.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5831
More information about the nio-dev
mailing list