Tobias S. Josefowitz @ Pike developers forum wrote:
Stdio.Buffer: Protect against calls in destructed Buffer objects.
#define CHECK_DESTRUCTED(io) ((io)->this ? (io) : already_destructed())
I don't get how that works, nothing really ever sets io->this to zero..., and if I am not mistaken we do not zero out CVAR Buffer [aka struct _Buffer] on destruct or free either... what am I missing?
Maybe you're not missing anything. I was assuming pike did this elsewhere on destruct. Apparently not, because I can indeed confirm that I still get heap corruptions and thus segfaults. I'll try setting this to zero explicitly on destruct.