Re: Segmentation fault cause

2020-07-21 Thread Stephen R. van den Berg
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote: >> Entering destructed objects happens "all the time" when callbacks >> to memberfunctions in already destructed objects are being called. >Not really; what does happen is that execution may return to a stack >frame in an object that

Re: Segmentation fault cause

2020-07-21 Thread Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
> Tobias S. Josefowitz @ Pike developers forum wrote: > >>I can now confirm that I've been running three hours with io->this = 0 at > >>destruct, and there have not been any coredumps yet. Seems promising. > > Four hours now, no coredump. Statistically relatively strong evidence. > > >I'm

Re: Segmentation fault cause

2020-07-21 Thread Tobias S. Josefowitz @ Pike developers forum
>Entering destructed objects happens "all the time" when callbacks >to memberfunctions in already destructed objects are being called. >Normal Pike deals with this, and thus PIKEFUN's have to guard against >it too. I really don't think this is particularly true considering that, at least as long

Re: Segmentation fault cause

2020-07-21 Thread Stephen R. van den Berg
Tobias S. Josefowitz @ Pike developers forum wrote: >>I can now confirm that I've been running three hours with io->this = 0 at >>destruct, and there have not been any coredumps yet. Seems promising. Four hours now, no coredump. Statistically relatively strong evidence. >I'm still a bit

Re: Segmentation fault cause

2020-07-21 Thread Tobias S. Josefowitz @ Pike developers forum
>I can now confirm that I've been running three hours with io->this = 0 at >destruct, and there have not been any coredumps yet. Seems promising. I'm still a bit surprised by the premise that a CMODs PIKEFUNs would be entered in/with an object *after* it has been destructed... you guard function

Re: Segmentation fault cause

2020-07-21 Thread Stephen R. van den Berg
Stephen R. van den Berg wrote: >>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

Re: Segmentation fault cause

2020-07-21 Thread Stephen R. van den Berg
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

Re: Segmentation fault cause

2020-07-21 Thread Stephen R. van den Berg
Tobias S. Josefowitz @ Pike developers forum wrote: >>Stdio.Buffer: Check for PIKE_T_FUNCTION before acting on objects. >> src/modules/_Stdio/buffer.cmod | 19 +++ >> 1 file changed, 7 insertions(+), 12 deletions(-) >>Both caused segmentation faults. Mostly because the