On Tue, 8 Sep 2026 10:01:23 GMT, Per Minborg <[email protected]> wrote:
>> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Indentation >> >> Co-authored-by: David Holmes >> <[email protected]> > > test/jdk/java/foreign/detachafterexit/libDetachAfterExit.cpp line 30: > >> 28: >> 29: static TestThread THREAD; >> 30: static volatile bool FLAG = false; > > My C++ is really rusty, but I think `volatile` is much weaker in C++ compared > to Java, so I wonder if there is actually any inter-thread synchronization > going on here or if we need to use something stronger like `std::atomic<bool> > FLAG(false); `? Yeah, racy access is UB, so we need atomic. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32686#discussion_r3956799403
