Integrated: 8329995: Restricted access to `/proc` can cause JFR initialization to crash
On Sun, 14 Apr 2024 08:53:05 GMT, Jaroslav Bachorik <jbachorik@openjdk.org> wrote:
Please, review this trivial change to make using `ProcessIterator` more robust in the presence of SELinux or a similar system.
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.
This pull request has now been integrated. Changeset: a92ad039 Author: Jaroslav Bachorik <jbachorik@openjdk.org> URL: https://git.openjdk.org/jdk/commit/a92ad03946d296510c8c2ac18278608e8032b3f3 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8329995: Restricted access to `/proc` can cause JFR initialization to crash Reviewed-by: dholmes, egahlin ------------- PR: https://git.openjdk.org/jdk/pull/18775
participants (1)
-
Jaroslav Bachorik