JDK-8202794 : Native Unix code should use readdir rather than readdir_r
  • Type: Bug
  • Component: core-libs
  • Affected Version: 11,12
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-05-08
  • Updated: 2022-01-05
  • Resolved: 2018-07-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.4Fixed 12 b03Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8207340 :  
Description
As discussed in JDK-8202353, readdir_r is problematic and is being deprecated by various platforms.  This is causing build failures on Linux when using recent versions of glibc. The replacement is readdir; the thread-safety issues with readdir are not a problem for most uses, including those in the JDK.

The uses of readdir_r in java.base/unix/native should be changed to use readdir instead.

Comments
Fix Request One of a set of 4 backports needed to compile against glibc versions > 2.24: JDK-8202353, JDK-8202794, JDK-8207340, and JDK-8207748. As a side effect, also fixes JDK-8202835. Patch applies cleanly net of line numbers.
29-03-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/c6600aba799b User: bpb Date: 2018-07-17 19:04:22 +0000
17-07-2018

A patch for this was proposed on the mailing list: http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-May/052991.html
08-05-2018

JDK-8166372 will be rendered moot by this.
08-05-2018