RFR: 8366062: [ubsan] add non-zero offset to nullptr in cds/archiveBuilder.cpp [v6]
    Afshin Zafari 
    azafari at openjdk.org
       
    Wed Sep 17 09:53:28 UTC 2025
    
    
  
> It is acceptable that the `SharedBaseAddress` option gets `0` at command line. The corresponding pointer arithmetic with `0` (`nullptr`) in archiveBuilder is UB.
> Specific casts are used to avoid UBSAN error.
> 
> Tests:
> linux-x64-debug: tier1 passed
Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
  fix after wrong merge.
-------------
Changes:
  - all: https://git.openjdk.org/jdk/pull/26983/files
  - new: https://git.openjdk.org/jdk/pull/26983/files/4ae49253..a2a4dec2
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26983&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26983&range=04-05
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26983.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26983/head:pull/26983
PR: https://git.openjdk.org/jdk/pull/26983
    
    
More information about the hotspot-runtime-dev
mailing list