Ron Yorston <rmy@xxxxxxxxxxxx> wrote: > I've been continuing to worry about this. > > In the old code (prior to commit 7c245aa) the TNL token that was > detected in list() had actually been read. The current code uses > peektoken(). > > When parseheredoc() is called in interactive mode the last call to > readtoken() is in the code to set the prompt. Even though the text > of that token is long gone it's used anyway. Exactly what then happens > on a given platform depends on how memory allocation is handled. > > I can make the error go away by explicitly reading the TNL token when > peektoken() detects a newline and we're about to call parseheredoc(). > > Of course, I may be wrong. The real problem is the fact that we call expandstr which reenters the parser and the parser is not reentrant. We need to save the parser state and restore it around expandstr. I'm working on a fix. Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt