Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-4550

TMessage doesn't honour kIsOwner bit when compression is used

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened (View Workflow)
    • High
    • Resolution: Unresolved
    • 5.34/00
    • None
    • I/O
    • None
    • All

    Description

      For TBuffer, one can set kIsOwner to false to ensure it doesn't delete the buffer passed to it. However, when using TMessage with compression, TMessage(void *buf, Int_t bufsize) moves the original fBuffer to fBufComp and decompresses that into fBuffer (I think).

      When the TMessage is deleted, fBufComp will be deleted even if kIsOwner is false. Since it contains the original buffer passed to it, this is dangerous (and inconsistent), and in my case crashes.
      fBuffer isn't deleted, but maybe it should be (allocated by TMessage).

      Besides the destructor, there are a few other places in TMessage that also delete fBufComp, these would also be affected.

      Attachments

        Activity

          People

            pcanal Philippe Canal
            cpulvermacher Christian Pulvermacher (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: