RFR: 8354954: Typed static memory for late initialization of static class members in Hotspot [v9]

Johan Sjölen jsjolen at openjdk.org
Tue Apr 29 08:25:54 UTC 2025


On Mon, 28 Apr 2025 17:26:02 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> 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`!

Yup

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24689#discussion_r2065773587


More information about the hotspot-dev mailing list