Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Feature request: ZSH_XTRACEFD variable



On Wed, 31 Jul 2019 at 21:46, Timothée Mazzucotelli
<timothee.mazzucotelli@xxxxxxxxx> wrote:
> > About leaks, I think file pointers are all freed in the params.c set and
> > unset functions.
> > However I'm not sure about exec.c, line 5396, in function execshfunc,
> > where xtrerr was
> > previously always reassigned to stderr. Now it is reassigned to a new file
> > pointer obtained
> > with fdopen(zsh_xtracefd, "w") each time, and maybe this could cause
> > memory leaks.

This seems to be a good use for the valgrind tool that is (?) to be
added to Zsh. You can check workers/44491 and 44492. With the thing
installed, you could create some test cases and run them throguh
Valgrind automatically and repeatably.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author