Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8234264

Incorrect 8047434 JDK 8 backport in 8219677

XMLWordPrintable

    • b01
    • generic
    • generic

      Reported by Felix Yang, felix.yang@huawei.com.

                The upstream patch set parameter use_vfork_if_available to true when call os::fork_and_exec in VM_ReportJavaOutOfMemory::doit().
                But looks like the 8u backport did something inconsistent: the change was not made in the correct place.
                The 8u backport patch: http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/97d605522fcb

              Patch for jdk8u-dev:

              diff -r 775e2bf92114 src/share/vm/utilities/vmError.cpp
              --- a/src/share/vm/utilities/vmError.cpp Wed Aug 07 17:00:19 2019 +0800
              +++ b/src/share/vm/utilities/vmError.cpp Fri Nov 15 14:23:50 2019 +0800
              @@ -1060,7 +1060,7 @@
                     out.print_raw (cmd);
                     out.print_raw_cr("\" ...");

              - if (os::fork_and_exec(cmd, true) < 0) {
              + if (os::fork_and_exec(cmd) < 0) {
                       out.print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
                     }
                   }
              @@ -1147,7 +1147,7 @@
              #endif
                   tty->print_cr("\"%s\"...", cmd);

              - if (os::fork_and_exec(cmd) < 0) {
              + if (os::fork_and_exec(cmd, true) < 0) {
                     tty->print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
                   }
                 }

            phh Paul Hohensee
            phh Paul Hohensee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: