From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4255 invoked by alias); 14 Jan 2018 14:01:43 -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: 42270 Received: (qmail 28158 invoked by uid 1010); 14 Jan 2018 14:01:43 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f178.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.192.178):SA:0(1.8/5.0):. Processed in 2.671052 secs); 14 Jan 2018 14:01:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_FAKE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: joeypabalinas@gmail.com X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+0rOHZFQeSOgLvw5ByZdRKCeHTzkneqQiIR0DemOH8I=; b=qa3HiC5HNpGOM77KiC27aSCv3tC4Z2WVbd1SQUMVWftqFYcVBfZ34ZO8lK5ltfTEQl EsuAgyrM1JQupZ9DyW7+1BqRVcd3eepN5SHA16WtyrIPnHQDCavprzCsPGaU1bxQzMNy 7eIenI83KulMLR9qt/WioLqMGFOoc6SWLrt5yIwWKWh+QOuLLJxyBE0x0VyWgFfvPEP7 2CY/WfDbxBI4Tk1JjxnTUcfVme5sW7ahuby1rq5wo+7Iauzq2dwAeIxRQp9h1RnmdDgY GWa9vCUbUlNb266JLa2PFueKytT9ZPw23jjYjNOtn75JMjltT41GRQvrXKHbHg+BxT/I CzaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+0rOHZFQeSOgLvw5ByZdRKCeHTzkneqQiIR0DemOH8I=; b=li9vTs0XAYWyEVd8Oht08GNjz48FvTPnPy2H5FAQBXQj410sHRAcRvYj28lkvkzRrM JmT/8Ewebj74dfD0YCJxtlORBuc6a5MlNNIVpKVB7z+p0c6LZ1FHvQscpGD7RAqXPLH2 adilosLeYdCERwuClnvc4pS3zu0ydBfsHSMqRVUa8DA0XHPuiRkGEo+7jX4awDJMxCG7 IU+Lgk846sGONo4lsxpRX4Al6BlmuFQt3eUbNHHAB1tBxH6fZYfpbK8HSx+s85AygVql 0ehVALiE4YJjcK3+lG6tXSQTd2bsuBXLJcP1AvxKvzkeeHQ1n24Fqgr+2Tu8HQEKgSET hvfw== X-Gm-Message-State: AKGB3mKFqQoNyOAG/6z2JNWGhEbT8hgUv1v8Fy5geDP3wpBXDO+4wWIw KTBxg5epN1psN9M+KlLsNwo= X-Google-Smtp-Source: ACJfBouvlGgnM1H0nULGW9/MWi46BH798GyooCQNBdPceIWz7CPVw//ISXAapSRKDJtccdkVqDzALA== X-Received: by 10.98.12.131 with SMTP id 3mr29042538pfm.189.1515938497775; Sun, 14 Jan 2018 06:01:37 -0800 (PST) Date: Sun, 14 Jan 2018 04:01:34 -1000 From: Joey Pabalinas To: Bart Schaefer Cc: "zsh-workers@zsh.org" , Joey Pabalinas Subject: Re: [PATCH] jp: fix segfaults during parameter expansion Message-ID: <20180114140134.dkltzozgs5mhh6ct@gmail.com> References: <20180114060557.hmrvpg6t4rdebgv6@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b7qiak5jl7g2qhgb" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 --b7qiak5jl7g2qhgb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 14, 2018 at 04:06:09AM -0800, Bart Schaefer wrote: > > Thanks for tracking this down. Defensive programming is always good, > but I think this is indicative of a problem further upstream. >=20 > What's the expected output of that substitution? No problem; to be quite honestly I don't think there is on, haha. Okdana on irc pointed it out, and I just tracked it down cause tracking down stuff like this is something I enjoy. When I found the NULL dereferences it made me wonder "wtf is going on here anyway???" so I asked: > 20:30 also how in the fuck did you even find this > 20:30 this is like something a fuzzer would pop out > 20:30 lol > 20:31 i was trying to assign a value to an association element > through indirection > 20:31 the AA is nonsense because a single element can't have an > array/association assigned to it obv > 20:32 i was just adding and removing stuff randomly to see what > would work so yeah :) Honestly, I mostly just wasn't comfortable with paramater expansion segfaulting, heh. On Sun, Jan 14, 2018 at 04:06:09AM -0800, Bart Schaefer wrote: >=20 > The following prevents the segfault for me, instead giving the error > "zsh: not an identifier: " (i.e., empty string is not a valid > parameter name). But perhaps there's a different error that should > occur here if val is NULL? That actually helped me realize (imo) a simpler solution; working on a [PATCH v2] right now. --=20 Joey Pabalinas --b7qiak5jl7g2qhgb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKlZXrihdNOcUPZTNruvLfWhyVBkFAlpbYr4ACgkQruvLfWhy VBlVwhAAzzXSIRrECSEu7XZLw4VkIz5AyFrz3l/1H2D68CTrhU/8Cp6w1yuxvto4 RLhMoDGAjWY5J0SNMkmzqVdx8S8hmlXlqdD9X0Ky4eyHystPuxkSGlBlL4ZyFftJ 5g6PG8S7USlU8ptQfGFVe64l8jiej292QrZr3TDxFtjen0NdXg+KC8G3MWGWDykq qS7KOtK599Gk2nP3+P7MEWarHKeU/IckNQ/LDxkHZRtjRGqN0CnswGTUaHPYaXrf WTj7pn8D79I69KCUjPF0d0ka6rTud1P9lzuzSBbC0A16pC3L1sCLNopMiFsV+pVx +0E60oY7HQwJ1qQnQ8RKyGt9mBu9bSczRFg5LvqjQBVjHip622yfwsZ84U7zMIMo vYAia59pN0py4rnjA7SKNscSwDBs5376XaN4bSmTdFIV9KX9+3Rcp6JUQHbMd9SA P3vlgi/RPpYY97lES53DkSBjPUewDd4wvJki+veY4MQRXWMq9STkSgH6MCrymvKR TjgzInERGzrq291XAacdCSBt0F59HkI27PamKLFOpHm8n3UC5h4HDKDqcoKw+sDA zsodmk8EEjhqlz3v8uWgZE15clNdSN0uELUFRad+qznnLyoQZqqnmrfT/LOK/l60 eLsIrkgSIzSqhDv+otq00gV1yxK4yZZO1N25rU2/yhzWxrjEmqI= =TCcq -----END PGP SIGNATURE----- --b7qiak5jl7g2qhgb--