On Sun, Dec 01, 2002 at 04:53:51PM -0800, Marc Singer wrote: > On Mon, Dec 02, 2002 at 12:02:01AM +0000, Colin Watson wrote: > > On Sun, Dec 01, 2002 at 02:39:48PM -0800, Marc Singer wrote: > > > I'm tracking a memory leak that appears to stem from regexec(). > > Hmm. What makes you think that this patch fixes a memory leak? I ask > because the patch appears to deal with 16-bit characters.
The crucial bit is the movement of the assignment to pstr->tip_context to inside the (offset < pstr->valid_len) test; that assignment was where the crash happened, and when I gdb'ed into it the test indeed wouldn't have passed. (I say crash, while you say memory leak; the crash was intermittent enough and bothered valgrind enough that I'm guessing it could have been a memory leak under other circumstances. No, I have no particular proof of this, but it might be worth your while trying it out.) -- Colin Watson [EMAIL PROTECTED]