Amos Jeffries <[email protected]> writes: [...]
>>>> + ptr = static_cast<Pointer *>(F->write_data); >>>> + delete ptr; >>> This is not going to work well. F->write_data now points to deleted >>> memory. If you absolutely have to do this, please set it to NULL after >>> delete. >> Insofar my understanding goes, the >> >> Comm::SetSelect(temporaryFd_, COMM_SELECT_WRITE, NULL, NULL, 0); >> >> in doneConnecting will do that (and - for good measure - the fd_close >> called from doneConnecting will clear the write pointers again). > > Yes, but the SetSelect needs to be kept paired close to the fiddling > with write_data. This is a hack, polishing it now is not a good > idea. The purpose of it is to keep the write handler state > consistent. Be conservative with the hack/workaround and don't depend > on all other code behaviour remaining the same indefinitely. I'm going to update this accordingly but this won't happen before Sunday --- I've been busy with fixing bugs in other code which repeatedly hit important customers and database log analysis in order to get to the bottom serious performance issues affecting the same customers since I wrote the two mails yesterday and couldn't really do anything with this code because of that.
