RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses()
Artem Semenov
asemenov at openjdk.org
Fri Aug 15 12:04:56 UTC 2025
The defect has been detected and confirmed in the function ArchDesc::declareClasses() located in the file src/hotspot/share/adlc/output_h.cpp with static code analysis. This defect can potentially lead to a null pointer dereference.
The pointer instr->_matrule is dereferenced in line 1952 without checking for nullptr, although earlier in line 1858 the same pointer is checked for nullptr, which indicates that it can be null.
According to [this](https://github.com/openjdk/jdk/pull/26002#issuecomment-3023050372) comment, this PR contains fixes for similar cases in other places.
-------------
Commit messages:
- The same issue is present in src/hotspot/share/runtime/continuationFreezeThaw.cpp FreezeBase::finalize_freeze()
- The same issue is present in src/hotspot/share/jvmci/jvmciEnv.cpp JVMCICompileState::JVMCICompileState()
- The same issue is present in src/hotspot/share/c1/c1_LinearScan.cpp Interval::split()
- The same issue is present in src/hotspot/share/nmt/mallocSiteTable.cpp MallocSiteTable::malloc_site()
- The same issue is present in src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp JfrThreadSampler::set_period()
- The same issue is present in src/hotspot/share/opto/vectorIntrinsics.cpp LibraryCallKit::inline_vector_gather_scatter()
- 8365604 Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses()
Changes: https://git.openjdk.org/jdk/pull/26798/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26798&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8365604
Stats: 12 lines in 7 files changed: 5 ins; 0 del; 7 mod
Patch: https://git.openjdk.org/jdk/pull/26798.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26798/head:pull/26798
PR: https://git.openjdk.org/jdk/pull/26798
More information about the hotspot-dev
mailing list