From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 05182525 for ; Wed, 31 Jul 2019 21:13:44 +0000 (UTC) Received: (qmail 20384 invoked by alias); 31 Jul 2019 21:13:37 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44631 Received: (qmail 20937 invoked by uid 1010); 31 Jul 2019 21:13:37 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f44.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25524. spamassassin: 3.4.2. Clear:RC:0(209.85.217.44):SA:0(-2.0/5.0):. Processed in 3.413886 secs); 31 Jul 2019 21:13:37 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.44 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=7HofGeBEy7OWFJ6fpUW8OBVHiX0LM7q1ZYf0Fe3oAgU=; b=r5N1uIN6Ky55QIR7ZfnE0ftxcoX7eGyyb5k6F1lR2SeSqzpRxNmSJEhymOQF8cqT1P +U58xUyTQjeS2Csk4RvAevKldcNBOg4qJtWuojJAYwZmJz1UmBubk2KtFEG6bCVcp1Hj 6XeSuBXOkR4l5W/Lq/UQ5Lm04kvL38ZuifcxOZOAmWG5z+69ju7Eg7gw2/g6p1ZF+Atf yCvrPR76qVmMw3EEfmIwMTE4esMSH5XKUIRoOFqCdXX35XuiZDZe/oD2O7JfJxKabXmd m3iapvvNcMjXMFfqxF4t/ioAcBxw0LWNjmT1lIumRkQ08k0W15ZATe0BaH1vRsqzTpwc t02Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=7HofGeBEy7OWFJ6fpUW8OBVHiX0LM7q1ZYf0Fe3oAgU=; b=eiX5swa/hEoIx+xKN3Ne7KYbVbbREXt0C/wcKZUpLPZ/nmQWWZuVHTEVcJy/Ezb631 MRbbidCDPml/3C0Jcz4XpLm/w1pq/5wtegxWSTOeLRcML3ADZ2L3dmKoMmKnGsqZvDuv 5Vd6/S4tcWdREuocEuEGSahzIbxpVcX1Ct+YP65SpOCTc2YTkLZSqPWNg/7uIHQo4hNS SVBLeqKEkE7AJne3RbPJt4+yjz0nx9qKQauxUv+b/+HtGNX2ClaxF95jq5o1HQkrPjU0 K2zItGr3vq/6woXzXp46v6A4pRKFrBKV9WXN/SRUOyUrrsMYlSmQvsKiqxal8KZ/1NRa dNdw== X-Gm-Message-State: APjAAAWMctZiMbs7HmbJa9gp4EfYBkWkPA28NsbCA2RKwaFdoCosl+0J 948ty5wI5UfD5FsKZ2hKJr7kz8n3N0qwnj8TTbE= X-Google-Smtp-Source: APXvYqziKhW+ToGHoC/3Clst/1RVGuBiqv0uNdItxCcBtdGiErFENIBOe3+42VvpnREkiitK4FubgcFFCGw9fkogFH0= X-Received: by 2002:a67:d81b:: with SMTP id e27mr77007997vsj.198.1564607580436; Wed, 31 Jul 2019 14:13:00 -0700 (PDT) MIME-Version: 1.0 References: <20190518075514.hbygmb5dl5wz23h5@chaz.gmail.com> <20190520103444.qyih7lvoigvf3rfx@chaz.gmail.com> <1563722540.4311.24.camel@samsung.com> In-Reply-To: From: Sebastian Gniazdowski Date: Wed, 31 Jul 2019 23:12:48 +0200 Message-ID: Subject: Re: Feature request: ZSH_XTRACEFD variable To: =?UTF-8?Q?Timoth=C3=A9e_Mazzucotelli?= Cc: Peter Stephenson , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 31 Jul 2019 at 21:46, Timoth=C3=A9e Mazzucotelli wrote: > > About leaks, I think file pointers are all freed in the params.c set an= d > > 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 f= ile > > 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. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org