RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM

Kevin Rushforth kcr at openjdk.org
Mon Jun 9 21:43:36 UTC 2025


On Mon, 9 Jun 2025 21:25:18 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> > I don't quite see how you guarantee a static field of a class is never accessed by another thread.
> 
> Wouldn't a WrongThreadException be thrown if that happens?

Yes. If we had 100% complete test coverage for all possible use cases, the fact that we don't see such an exception would give us confidence, but we don't. So we either need to prove that it can't happen, or we will need to go back to using a shared arena -- at least for the two static off-heap arrays.

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

PR Comment: https://git.openjdk.org/jfx/pull/1814#issuecomment-2957101637


More information about the openjfx-dev mailing list