[8u] RFR: JDK-8150460 (linux|bsd|aix)_close.c: file descriptor table may become large or may not work at all

Andrew Dinn adinn at redhat.com
Thu Jan 2 09:35:51 UTC 2020


I would like to backport the following fix to jdk8u:

  JIRA: https://bugs.openjdk.java.net/browse/JDK-8150460
  patch: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/ee0a64ae78db

This fix avoids malloc of up to 50Mb of memory during initial
link-loading of libnet. The worst case happens in a runtime where no fd
limit is set.

The saving is not especially significant when linking libnet.so into
OpenJDK8 (although 50Mb /is/ well worth saving). It is much more
significant when libnet.a is linked into a Graal native image. See this
discussion on the GraalVM dev list for more details

  https://github.com/oracle/graal/issues/1984

Updated Patch:
The patch applies cleanly after tweaking the file paths and fixing up
some minor whitespace and copyright headers differences

  http://cr.openjdk.java.net/~adinn/8150460/webrev.00

Testing:
tier1 tests pass as before.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill




More information about the jdk8u-dev mailing list