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 buffer.cmod code is not good with asynchronously destructed objects.
Where did the segfaults occur then, exactly? What has output's type been at segfault, if not PIKE_T_FUNCTION?
This one caused segfaults in io_actually_trigger_output() because the value was PIKE_T_UNKNOWN with a value of -1, which then got dereferenced because -1 != 0 at:
if ( io->output.u.object ) { move_svalue(Pike_sp++, &io->output); SET_SVAL(io->output, PIKE_T_INT, NUMBER_NUMBER, integer, 0); --> apply_svalue(Pike_sp-1, 0); pop_n_elems(2); }