RFR: 8362657: Make tables used in AOT assembly phase GC-safe
    David Holmes 
    dholmes at openjdk.org
       
    Wed Sep 17 01:17:43 UTC 2025
    
    
  
On Tue, 16 Sep 2025 20:42:17 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Upstreaming from the Leyden prototype in anticipation of AOT code compilation ([JDK-8335368](https://bugs.openjdk.org/browse/JDK-8335368)).
> 
> We have a few tables that are currently consulted only inside the CDS safepoint. With AOT code compilation, these tables may be consulted after we leave the CDS safepoint. For GC safety, this PR uses `OopHandle` instead of `oop` in hashtables.
src/hotspot/share/cds/heapShared.cpp line 2130:
> 2128: // These tables should be used only within the CDS safepoint, so
> 2129: // delete them before we exit the safepoint. Otherwise the table will
> 2130: // contain bad oops after a GC.
So is this just for good code hygiene? I don't see any changes that involve checking these table pointers for null, so presumably no code actually tries to access them outside the safepoint?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27323#discussion_r2353973680
    
    
More information about the hotspot-runtime-dev
mailing list