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

Re: Valgrind tests (was: Re: Zsh: [7] + 23074 suspended (tty output))



On Thu, 2019-07-04 at 01:29 +0200, Sebastian Gniazdowski wrote:
> The tests apparently reveal one memory leak currently:
> 
> ==52847== 79 (24 direct, 55 indirect) bytes in 1 blocks are definitely
> lost in loss record 349 of 550
> ==52847==    at 0x10017B545: malloc (vg_replace_malloc.c:302)
> ==52847==    by 0x10004899E: zalloc (mem.c:966)
> ==52847==    by 0x10004316D: znewlinklist (linklist.c:120)
> ==52847==    by 0x10003989D: addfilelist (jobs.c:1297)
> ==52847==    by 0x100017AC0: getoutputfile (exec.c:4796)
> ==52847==    by 0x100078474: stringsubst (subst.c:254)
> ==52847==    by 0x100077E46: prefork (subst.c:142)
> ==52847==    by 0x10001A24F: execfuncdef (exec.c:2567)
> ==52847==    by 0x10001DC23: execcmd_exec (exec.c:3896)
> ==52847==    by 0x10001AAF6: execpline2 (exec.c:1927)
> ==52847==    by 0x100015938: execpline (exec.c:1658)
> ==52847==    by 0x1000150E2: execlist (exec.c:1413)

By the way, I think these are benign --- addfilelist() adds a file to be
tidied up when a job exits, but these appear to happening in subshells.
This means there's no job clear-up --- but the shell simply exits.  So
the memory isn't recovered in the subshell but that doesn't cause a
long-term build-up.

I haven't followed every single one of this type, though.

pws



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