RFR: 8354954: Typed static memory for late initialization of static class members in Hotspot [v9]
Kim Barrett
kbarrett at openjdk.org
Mon Apr 28 17:35:58 UTC 2025
On Mon, 28 Apr 2025 13:34:39 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> More documentation, rename ptr to get
>
> src/hotspot/share/utilities/stableValue.hpp line 70:
>
>> 68: template<typename... Ts>
>> 69: void initialize(Ts&... args) {
>> 70: DEBUG_ONLY(_initialized = true);
>
> Shouldn't we also check here that `_initialized == false`?
Yes, it should. My (untested) proto earlier had the other, more serious, bug of forgetting to
assign `_initialized`!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24689#discussion_r2064148527
More information about the hotspot-dev
mailing list