Skip to content

Commit

Permalink
8329995: Restricted access to /proc can cause JFR initialization to…
Browse files Browse the repository at this point in the history
… crash

Reviewed-by: shade
Backport-of: a92ad03946d296510c8c2ac18278608e8032b3f3
  • Loading branch information
neethu-prasad authored and shipilev committed Jun 6, 2024
1 parent 28aa19e commit a86a221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/os/linux/os_perf_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ SystemProcessInterface::SystemProcesses::ProcessIterator::ProcessIterator() {
bool SystemProcessInterface::SystemProcesses::ProcessIterator::initialize() {
_dir = os::opendir("/proc");
_entry = NULL;
_valid = true;
_valid = _dir != NULL; // May be null if /proc is not accessible.
next_process();

return true;
Expand Down

0 comments on commit a86a221

Please sign in to comment.