JDK-8261167 : print_process_memory_info add a close call after fopen
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2021-02-04
  • Updated: 2024-02-08
  • Resolved: 2021-02-05
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 17
11.0.12Fixed 17 b09Fixed
Related Reports
Relates :  
Relates :  
Description
There is an ::fopen  call  opening   "proc/self/status"  in print_process_memory_info.  This should also have a corresponding close-call.

See also : 
https://sonarcloud.io/project/issues?id=shipilev_jdk&open=AXck8BNvBBG2CXpcnaeA&resolved=false&severities=BLOCKER&types=BUG
Comments
jdk11 backport request I would like to have the patch in jdk11 as well, because the issue is present there too. The patch applies cleanly.
05-03-2021

Changeset: 43ae0cf8 Author: Matthias Baesken <mbaesken@openjdk.org> Date: 2021-02-05 13:37:44 +0000 URL: https://git.openjdk.java.net/jdk/commit/43ae0cf8
05-02-2021