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

Crash in Exceptions::log_exception() due erroneous copying of stringStream

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 13
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None

      Description

      (Yet unpushed) JDK-8224193 uncovered a bug in Exceptions::log_exception(). Stream object argument is handed down by value:

      void Exceptions::log_exception(Handle exception, stringStream tempst);

      which creates a copy which shares the internal backing buffer with the original one frame upstairs. Worked out of accident before when backing buffer was allocated in resource area, but since with JDK-8224193, it is allocated via C-heap which leads to a double free.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: