Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-50274

DirectByteBufferOutputStream may crash if used after close

    XMLWordPrintableJSON

Details

    Description

      `DirectByteBufferOutputStream#close()` calls `StorageUtils.dispose()` to free its direct byte buffer. This puts the object into an unspecified and dangerous state after being closed, and can cause unpredictable JVM crashes if it the object is used after close.

      We can make this safer by modifying `close()` to place the object into a known-closed state, and modify all methods to assert not closed.

      Attachments

        Issue Links

          Activity

            People

              ankurd Ankur Dave
              ankurd Ankur Dave
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: