Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8358330

AsmRemarks and DbgStrings clear() method may not get called before their destructor

XMLWordPrintable

    • b26

      In CodeBlob::create which gets called when loading a code blob from AOT code cache, if the memory allocation for the code blob fails, then the clear() method on archived_asm_remarks and archived_dbg_strings would not be called. This can cause assertion failure in the destructors of AsmRemarks and DbgStrings that expect the clear() method to be invoked before the destructors.

      Relevant code is https://github.com/openjdk/jdk/blob/b3594c9e5508101a39d10099830f04b0c09ad41f/src/hotspot/share/code/codeBlob.cpp#L299-L310

      This can be fixed by always calling clear() in the destructor.

            asmehra Ashutosh Mehra
            asmehra Ashutosh Mehra
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: