We used to stream objects using TBufferFile but with version 6.08/04 this produces segmentation violations when we try to stream a class inheriting from TRandom
The reading/writing of the object from the buffer does not return any error message but the object seems to be corrupted: IsA() returns a memory address which seems to be on the stack. I wrote a small example which for me works fine with 6.06/08 and produces an output similar to
(notice that the two TClass pointers are identical as they should) but with 6.08/04 I get something like
instance at: 0x978c70, TClass* from IsA(): 0x1a1d6e0
instance at: 0x1290d00, TClass* from IsA(): 0x1a1d6e0
(with the second TClass pointer being suspiciously high).
instance at: 0x1e8a2c0, TClass* from IsA(): 0x2d5ad20
instance at: 0x2f732a0, TClass* from IsA(): 0x7f7f9df89445
Any attempt to access this object in a meaningful way produces segmentation violations. This breaks our multiprocessing completely as transmitting the random state immediately crashes.
I tried to follow this down and the ReadObjectAny() seems to have the correct class pointer till it calls the streamer in TBufferFile.cxx:2539: