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

Re: Purified zsh-3.0.1



Zoltan Hidvegi (hzoli@xxxxxxxxxx) wrote:
> ***************
> *** 1787,1792 ****
> --- 1790,1797 ----
>   	pm->flags |= PM_EXPORTED;
>       if (pm->flags & PM_EXPORTED)
>   	pm->env = addenv(s, u);
> +     else
> + 	zsfree(u);
>   }

This one is wrong, I'm afraid.  Here I get FUM (Freeing Uninitialized
Memory), which is *bad*.

If I use only the first part of the patch, there are no FUMs, but the
leaks seem to persist. :(

BTW, after quitting zsh, it seems that a descriptor is in use, which
shouldn't be:

         FIU: file descriptor 10: "/home/srce/hniksic/.zcompctl", O_RDONLY
         Duplication of file descriptor 5.
         File info: crwx------  1 hniksic  tty              0 Nov 11 02:25
         File position: 1787837
         This file descriptor was allocated from:
               fcntl          [libc.so.1]
               movefd         [utils.c:877]
               source         [init.c:781]
               bin_dot        [builtin.c:4726]
               execbuiltin    [builtin.c:185]
               execcmd        [exec.c:1653]

Why does .zcompctl stay open (.zcompctl is the name of a file in my
home directory that I source from .zshrc)?

-- 
Hrvoje Niksic <hniksic@xxxxxxx> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
I'm a Lisp variable -- bind me!



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