[ROOT-4550] TMessage doesn't honour kIsOwner bit when compression is used
Check duplicate issues.
- [ ] Checked for duplicates
Description
From https://its.cern.ch/jira/browse/ROOT-4550
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.
Reproducer
As per the description
ROOT version
Any
Installation method
Any
Operating system
Any
Additional context
No response
Possible solution in a provate branch. Plan to create PR after some additional local tests