RFR: 8297451: ProcessHandleImpl should assert privilege when modifying reaper thread

Chris Hegarty chegar at openjdk.org
Wed Nov 23 08:37:39 UTC 2022


On Wed, 23 Nov 2022 05:01:40 GMT, Ryan Ernst <duke at openjdk.org> wrote:

> This commit guards thread modifications for the process reaper thread with doPrivileged.

Hi @rjernst Thanks for taking this one on. 

I agree with adding the privileged blocks around the calls to Thread::setName, but the usage raises a warning which fails the build. It might be cleaner and easier to refactor into a privilegedThreadSetName helper method.

Additionally, I noticed that there is an existing test that can be modified slightly to cover this.

I've put these two comments / suggestions in the form of a PR and raised it against your branch. https://github.com/rjernst/jdk/pull/1

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

PR: https://git.openjdk.org/jdk/pull/11309


More information about the core-libs-dev mailing list