Zsh Mailing List Archive
Messages sorted by:
Re: PATCH: Fix leak during Y shortcircuit glob qualifier
- X-seq: zsh-workers 36607
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: Fix leak during Y shortcircuit glob qualifier
- Date: Thu, 24 Sep 2015 05:38:03 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fFdaM7y4xSrOa+fZ1HbiWUc1Fk+pGAeeyG09xLMVutc=; b=RwgP8BoQhmm4kU1aLnJc1ECpLMqE0IHwrCfMzOrd4MFcWQHd0J28/0qS1VfO14tB72 IXw8hR8ge9RBBoc5a0g7voW/tQJFsjGfjklsmhs3MH5+M1rhXK5U4kbOZJUJEp96/91Z d3GUVPzEgwzz6iPK911Op98/6C8L69Gw+z3lLk9YQdXOmQ9T2slFRpyEMSTc7AM7AaY3 x1X3/UKZSVgbI1Ddyazkj1AQZD41vZQFodui8hr30cj5cLZRgYMMpuL9blKSKmCn9x6p Z7EMBY2PKIJoO58U1vJ8rtj2rDj2eanxxAN4rnwKSwOn2/2E7RU/4jIF0OFrSyYBmR5b 174A==
- In-reply-to: <150923201201.ZM32285@torch.brasslantern.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <firstname.lastname@example.org> <150923201201.ZM32285@torch.brasslantern.com>
On Thu, Sep 24, 2015 at 5:12 AM, Bart Schaefer
> On Sep 23, 11:54pm, Mikael Magnusson wrote:
> } Subject: PATCH: Fix leak during Y shortcircuit glob qualifier
> } The closedir(lock) is the leak I actually did see in usage, I have no
> } idea if the other part is needed/harmful though. I'll commit just the
> } closedir if nobody has any opinions.
> Since scanner() is being called recursively, it's not clear that the
> recursive call won't have already done an equivalent restoredir()
> in the first two "return" cases -- but I do suspect it's needed in
> the case where the closedir(lock) plugs a leak.
> Is the current directory munged in the situation where you found a leak?
Oops, I see that I forgot to include the actual test case in the
message. I think I had it typed out in gmail and then decided to look
into the code instead and forgot to put it in the git send-email.
% : ./*(-.Y1N); ls -l /proc/$$/fd
was my test case, so not much would happen to $PWD in that particular
case. I tried */*/*(-.Y5N) instead now, and nothing untoward seemed to
happen then either (without and with my patch, so no weird pwd
changing or errors about double frees, respectively).
Messages sorted by: