From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 236B023623 for ; Tue, 5 Mar 2024 22:54:27 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1709675668; b=HxEeJ/+qoPw6jQ9bJS9dRmbrWTLQLAA28PutyyWQJhNINKnipy9rZrc2Y/iMkAVC/CAtJUmTch 2lLmHOXEAqhJnm7Y0EyB7HKpXrYaOkYs3dNtnwII+erYaCvnb6NwBlIsKE2umwuLL5oTTjj7vE Gen1AmoXcf4VJJeQvB3nz560XFDT2bxmmknqo/9MRljgLGyHM2MC7A7MqIoqm1LH+hm9b5hlFP dSOzlsw3PijzoOX46c9fHuSvlUU5ilhjbKLcw77L4xphmspEJnJKxs62s0GJ/OKPMR4+aau4gR OLDWvbWJjjTw9Mol7Oxw2bFLI5at1SzmVLQpxs0fELvQUA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mslow1.mail.gandi.net) smtp.remote-ip=217.70.178.240; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1709675668; bh=q+4yg1AveY6PpQyW4Vt+h/xy5RsCe2rBho5ZgQkVPd4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=cDbxsSsBgAsb+G3AekJOBcoqP3ukck1Dm1EaUpGoglRvjdPz7Lw05R7ysgzZRSrMpk6ttM4lAn yiDE9JL+cxV+77UFPWtAsW/4n/ZSfql+6NNlJ6hvWQP1wAOzo6YJ4uVyr9nztVFDpAUrv+5TPI hALWcdWDkh3ba/O3v83G9z2lGK629wSH30/6HDXn/rp+iD9QpSjJQdGDTlCLje6uPa0+p26vd8 Is0l8hbU6FCqPbDzGxz0uUFJ8Ft/PTBjzNW60WyNKI7VCV8ty3Bfd+pp4mx1jmvo/CNCK43/OG oJlYOhOocsawyaq2SU1vh04FDcBzDb7uu5gYCKPm/cMmCQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=0P+u7KrN4Fbp8hWNG3MxbhA7sQdEzB9INYwuYeW4iE8=; b=P1B5brUN3Q1QDfezh15GDUkT8u OWD+GSHr7s349hJkfnLF7nbDBj8kpKupqkpe1903vIQQgRpV4/NLzRobcslAsV2zQV8uinyZJzDVL VUYwc+kQVEO78jFIpVInomAPkq2erqxnHYrP/7vwHWf3mlnzoMElmiasrVs94brcCpZJ1oPOZoN8w hA0zju6gxnr0DJjxpzf1lBZQ6gjTYsy7yTnRPZyFiuMue5rRhHK4uAWRSCrd/djA4BvnH7Tml/jGx DQ0CEw+hRkPQWQfNmBPkhH/S0wnpX/YAvAxnBhMEzUShl6131MAA2zne7MtY5yMWq+lM5GmBQn97u wFQc0xdw==; Received: by zero.zsh.org with local id 1rhcjz-0001W8-Qc; Tue, 05 Mar 2024 21:54:27 +0000 Authentication-Results: zsh.org; iprev=pass (mslow1.mail.gandi.net) smtp.remote-ip=217.70.178.240; dmarc=none header.from=chazelas.org; arc=none Received: from mslow1.mail.gandi.net ([217.70.178.240]:48657) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1rhcjM-0001Bc-Ix; Tue, 05 Mar 2024 21:53:49 +0000 Received: from relay4-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::224]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 4F45EC2924 for ; Tue, 5 Mar 2024 19:51:58 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 90749E0002; Tue, 5 Mar 2024 19:51:34 +0000 (UTC) Date: Tue, 5 Mar 2024 19:51:33 +0000 From: Stephane Chazelas To: Bart Schaefer Cc: Zsh hackers list Subject: Re: [PATCH] Fix crash on unset-through-nameref Message-ID: <20240305195133.5rzpyrns6qltlh2p@chazelas.org> Mail-Followup-To: Bart Schaefer , Zsh hackers list References: <20240304062914.kn6wquvgog3lefom@chazelas.org> <20240304193409.lv725ah6eifiazzx@chazelas.org> <20240305081859.r3qwiyduk2wgkdby@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-GND-Sasl: stephane@chazelas.org X-Seq: 52687 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: 2024-03-05 10:42:18 -0800, Bart Schaefer: [...] > Although I wasn't aware of that discussion, I had already thought of that: > > When RNAME includes an array subscript, the subscript expression is > interpreted at the time ${PNAME} is expanded. Any form of subscript is > allowed, including those that select individual elements, substrings of > scalar strings, or multiple elements as with array slices or the '(i)', > '(I)', '(r)', '(R)' and '(w)' subscript flags. However, the subscript > is evaluated with the NO_EXEC option in effect, so command substitution > and other similar constructs produce no output, although are not > syntactically excluded. [...] Thanks for those details. Note the double evaluation though (where n ends up incremented twice each time in my example) which seems to be affecting all shells except bash. -- Stephane