RFR: 8282721: HotSpot Style Guide should allow considered use of C++ thread_local
John R Rose
jrose at openjdk.java.net
Mon Mar 7 19:21:02 UTC 2022
On Mon, 7 Mar 2022 06:34:20 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Style guide changes to support JDK-8282469 (PR https://github.com/openjdk/jdk/pull/7719). We no longer prohibit use of C++ `thread_local`, but allow it when there is an essential, and considered, need.
>
> This is a modification of the Style Guide, so rough consensus among the HotSpot Group members is required to make this change. Only Group members should vote for approval (via the github PR), though reasoned objections or comments from anyone will be considered. A decision on this proposal will not be made before Friday 18-Mar-2022 at 12h00 UTC.
>
> Since we're piggybacking on github PRs here, please use the PR review process to approve (click on Review Changes > Approve), rather than sending a "vote: yes" email reply that would be normal for a CFV.
This change goes with a deletion of the old backstop we have against using global operator new; it was some definitions of `operator new` which raise a call to `fatal`. That old file had a useful bit of lore, which perhaps should be tranplanted here. Suggested addition to rationale for not using global operator new:
Typically, uses of the C++ global operator new are inadvertent and
therefore often associated with memory leaks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7720
More information about the hotspot-dev
mailing list