[jdk17u-dev] RFR: 8329995: Restricted access to `/proc` can cause JFR initialization to crash

Aleksey Shipilev shade at openjdk.org
Wed Jun 5 09:13:57 UTC 2024


On Fri, 31 May 2024 21:07:41 GMT, Neethu Prasad <duke at openjdk.org> wrote:

> Backport of JDK-8329995
> 
> The call to os::opendir("/proc") may return nulltptr if the /proc is not accessible due to restrictions placed by the SELinux. In that case the ProcessIterator will SIGSEG because it assumes the _dir, which is the variable storing the result of the os::opendir("/proc") call to be non-null.
> 
> The patch is missing regression test because it is very hard to simulate /proc not being accessible to the test process.
> 
> **Testing**
> All jdk_jfr and hotspot_gc tests passed.

I was puzzled why this backport is not marked as `clean`. Please compare with the original changeset, there is a superfluous `;` in this PR.

-------------

Changes requested by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk17u-dev/pull/2516#pullrequestreview-2098503450


More information about the jdk-updates-dev mailing list