JDK-8358230 : Incorrect location for the assert for blob != nullptr in CodeBlob::create
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2025-05-31
  • Updated: 2025-06-01
  • Resolved: 2025-06-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 masterFixed
Description
In CodeBlob::create:

{
  ...
      blob = archived_blob->restore(code_cache_buffer,
                                    name,
                                    archived_reloc_data,
                                    archived_oop_maps);
#ifndef PRODUCT
      blob->use_remarks(archived_asm_remarks);
      archived_asm_remarks.clear();
      blob->use_strings(archived_dbg_strings);
      archived_dbg_strings.clear();
#endif // PRODUCT

      assert(blob != nullptr, "sanity check");
  ...
}

assert for blob != nullptr should be done immediately after the call to archived_blob->restore()
Comments
Changeset: 59dc8499 Branch: master Author: Ashutosh Mehra <asmehra@openjdk.org> Date: 2025-06-01 01:04:54 +0000 URL: https://git.openjdk.org/jdk/commit/59dc849909c1edc892c94a27b0340fcf53db3a98
01-06-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25566 Date: 2025-05-31 20:45:56 +0000
31-05-2025