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 c4d59d1d for ; Tue, 30 Jul 2019 22:12:46 +0000 (UTC) Received: (qmail 23108 invoked by alias); 30 Jul 2019 22:12:39 -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: 44613 Received: (qmail 20189 invoked by uid 1010); 30 Jul 2019 22:12:39 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f47.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.166.47):SA:0(-2.0/5.0):. Processed in 2.117657 secs); 30 Jul 2019 22:12:39 -0000 X-Envelope-From: roman.perepelitsa@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.166.47 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=CFXd4bwtjReEur4MrXNTHUDMNCdu2Ps7dBiaWQVcHOU=; b=aD8oSZZ4i8OajU42rp0xrA9mPyqmK5HsRUHfpYJIAESSBerlqEuHiyeh8ejRTDPG6p wmYDFl4BsLaYCVHlSYNq3qMbTDlNVsSiDPGfhLhXBsT/VeukIAS+anR1rh7kIlRcX5Rh x/XnIM3tqLnO4HmpwTjHfSlGCXhGkd8F+ZmkieRiiK9A0gWoN0KasrITDLlT4OnZDTwo S26g9YFE5LuTCyeR6zlj7q2X75CmrVXjkfeDkMBoZB2KyGs/4wfDQXRGDK62qTtVTIJu AcVU1wqWAZg0/8+ltwEgjCJM0lCUx2vYuBICJaV140+Jdbo4E/Z783ZN4tlHS181+Rx1 tw9g== 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=CFXd4bwtjReEur4MrXNTHUDMNCdu2Ps7dBiaWQVcHOU=; b=HrbxxfhQ5mHUQVMc6NbfSew5dYocFHMyxT5POoyazxcucAscAEnKqBnNrdl/Nb4eLv q/eWxtvWzM0331ziumOXhfwknpW/+Ld1CY3TO21yinmcK2JnR9D0BUNd26K/qI9eF/Oj 1GwCaur8V8iadrWKWcL43Cj0TrH3JACIMzYL9z1mgSUFTHMLMZSHibvuonuUjykN7jXu N6VA1uTf25CJjLTY8r2BCWKocz2zXI9uahwOjb/sXLfvCFrHb3TXwKmRxq3Z/O/NaagU qrZjBKIFNkArvTzImZeS6JRiB/jNJkoRUdmzxHZG3du72q8FFeIViCqz80Uh9v/rOcA9 4zTw== X-Gm-Message-State: APjAAAXv41Ik7mEICHWvDy0Oi/jLdSk16iuvYD5XpfcLw/WpA+X3EPMY af6kWsY353a57LJgjG3I/EmeMkbNx5yW3NPfoPU= X-Google-Smtp-Source: APXvYqwDcV+avJJlArJcvhbj4MAppM0v5gwxl2V9qOhHWVIe4rrMR4hIsMJAMZQmlaQdWwh4uXiXj9Vi2szLbWgomek= X-Received: by 2002:a5d:8890:: with SMTP id d16mr60800868ioo.274.1564524723988; Tue, 30 Jul 2019 15:12:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Wed, 31 Jul 2019 00:11:53 +0200 Message-ID: Subject: =?UTF-8?Q?Re=3A_A_serious_bug_in_execution_=E2=80=93_where_to_debug=3F?= To: Sebastian Gniazdowski Cc: Bart Schaefer , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2019 at 11:54 PM Sebastian Gniazdowski wrote: > > On Tue, 30 Jul 2019 at 23:45, Roman Perepelitsa > wrote: > > > > On Tue, Jul 30, 2019 at 11:38 PM Sebastian Gniazdowski > > wrote: > I avoided localoptions for performance =E2=80=93 it consumes some time, a= s it > (probably, but the performance effect is confirmed) allocates a new > table of options and fills it with defaults. So I've decided to write > an option-transparent code. But turns out that this might be hard in > case of such options as errreturn. I'll think about whether to replace > inline conditions with if-then or to do emulate -L. Keep in mind that 5.4 (I think it was 5.4) had a bug where a false condition under `if` was causing the function to return if err_return is set. Same with `while` -- it would return from the function at the end of iteration. 5.4 is still very popular. My solution for the performance problem is to call `emulate -L zsh` only at the points of entry (public API) and then avoid calling too many small functions. Roman.