Request for approval (was Re: Request for review: 7039182)
David Holmes
David.Holmes at oracle.com
Sun Aug 7 23:00:30 PDT 2011
As this is identical to the JDK8 fix it seems I need only seek approval
and not re-review.
Thanks,
David
David Holmes said the following on 08/05/11 13:02:
> 7039182 is not a public CR so I'll summarize the issue.
>
> When the NIO libs are built there are a few files that contain constants
> that represent platform specific I/O constants found in various C header
> files. Normally the build process compiles and runs a small C program
> which will generate the .java file for that platform.
>
> When I integrated the basic support for cross-compilation I modified
> this process to use the host C compiler not the cross-compiler for the
> target, as we couldn't execute the resulting C program. That wasn't the
> correct thing to do because it means we generate values for the build
> platform not the target platform. Luckily these values are mostly the
> same on the Linux platforms we care about, but not all the same (hence
> this bug report where a read system call returned EINVAL because we
> thought we were passing O_NOFOLLOW but in fact passed O_DIRECT).
>
> The simplest fix is to not try to generate a file when cross-compiling
> but allow the developer to specify where these files can be found. This
> is done using the NIO_PLATFORM_CLASSES_ROOT_DIR variable which is
> expected to be the "root" directory for where classes can be found and
> the directories under that are expected to follow the package hierarchy
> for the files, so, for example we will look for:
>
> $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/ch/SocketOptionRegistry-$(PLATFORM)-$(ARCH).java
>
>
> the platform and arch are used in the filename as we don't have
> platform/arch directories in the JDK repo.
>
> In addition I reverted the original change to use the host C compiler as
> this allows you to specifically build the generator program using the
> cross-compiler (which will get the right values) then copy it across to
> the target system and run it to generate the file.
>
> ---
>
> Here's the webrev against 7u-dev:
>
> http://cr.openjdk.java.net/~dholmes/7039182/webrev.u2/
>
> ---
>
> Here's the information from the JDK 8 submission:
>
> http://hg.openjdk.java.net/jdk8/tl/jdk/rev/3abc52f0a4dc
>
> 7039182: PPC: NIO: java.io.IOException: Invalid argument in
> sun.nio.ch.FileDispatcherImpl.read0
> author dholmes
> Mon Jun 27 20:13:48 2011 -0400 (5 weeks ago)
> changeset 4369 3abc52f0a4dc
> parent 4368 a053c28304e8
> child 4371 585cc4a4528d
> 7039182: PPC: NIO: java.io.IOException: Invalid argument in
> sun.nio.ch.FileDispatcherImpl.read0
> Summary: Allow platform specific files to be located at build time
> instead of generating them
> Reviewed-by: alanb, ohair
>
> Thanks,
> David Holmes
More information about the jdk7u-dev
mailing list