From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] * src/eval.c: Stop checking for nvars, and use only CONSP Date: Tue, 2 Mar 2021 05:34:35 +0000 Message-ID: References: <20210302.111043.609653289571449353.conao3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2931"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Naoya Yamashita Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 02 06:36:04 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGxhU-0000cZ-6L for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 06:36:04 +0100 Original-Received: from localhost ([::1]:60780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGxhT-0004VO-6w for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 00:36:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGxgg-00044O-CX for emacs-devel@gnu.org; Tue, 02 Mar 2021 00:35:14 -0500 Original-Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]:41746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGxge-0005Nb-NK for emacs-devel@gnu.org; Tue, 02 Mar 2021 00:35:14 -0500 Original-Received: by mail-ot1-x331.google.com with SMTP id x9so14579703otp.8 for ; Mon, 01 Mar 2021 21:35:12 -0800 (PST) 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; bh=Wr/Qpjy6qpT3PBL7065Aq0YsDeDaNTuA3SxVNEpVpuY=; b=MJOjjYzVD1iU9T82JKvKNnLUp6fs6yUx7IrfVwrUpCk5WUEtavgY+JqUihVhUbG+yh d+alwV2Ooco5tRsRx14ZZkxJDLempyaMwvpDpHaeBMUciVYYtQN0NV9aPCcuhhlUgaqQ 2cIKomeqn17QlSKqSPN5GUsFY96ExzgzTXMpZPDClDe+8IW4kWCkpNc7v69K40PKCTv9 khnPEbG84AGXMgIqKJSlZlFeOxZCzY5qOsQGXTWmyJWSad5IljuFujfIck23ePVpAYv4 A4IwXLd808iabIbIoNWshsiCR1vXikw6kKIUPmQLFqFpDfNCnjER/cgv98LsGW7oRMJE fCyg== 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; bh=Wr/Qpjy6qpT3PBL7065Aq0YsDeDaNTuA3SxVNEpVpuY=; b=aIuZ2hJi4iQBKF6yw3O5qsB8Ek4SCsPqcHYzJJoI3yOtDtci7wK9h9tDhp75BSo4Of Jx4RLGuznO3Zjmag5ge+dLPh5Z7skN8Ig2nxWji9ABSbhjG0D+LR3pTwiORN5EJHB8oC ZSWKtK8faGNjBHYQUmRoaCLBX8+uvdllest0AogduUbgvo36JzaAgw1J0ROXa2lAPvj0 xprak6qYOMrWaDjKmcWk0k1SQCf+aUNB5n4UbPpkjQPi0MfRGRU1ZEHrFmJjvMjBbWgd jyUw9TGc+1fju2BlDzd8yTnJLyUBD1Ay0tgLk2CMB+F643s4cpVlcBePt1Nn7oZI/+DY +EFw== X-Gm-Message-State: AOAM530j5YAANy9/myrP2QxFsC2+rmsdk39iENCGUs3bwVJ8LvziPixK O1PLQWrzGwOy8khSGCxmuyJcN55g9vZzsyFe/4w= X-Google-Smtp-Source: ABdhPJySAtGIxyFEa0NFU9g6of4GDH3aVJfEGHBbRfWYM2Frxvr+oemB0KvdrMptKJO6PY20Ms+fQVYOm2C8DzjUUxc= X-Received: by 2002:a05:6830:3090:: with SMTP id f16mr16509320ots.292.1614663311220; Mon, 01 Mar 2021 21:35:11 -0800 (PST) In-Reply-To: <20210302.111043.609653289571449353.conao3@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::331; envelope-from=pipcet@gmail.com; helo=mail-ot1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265803 Archived-At: On Tue, Mar 2, 2021 at 2:19 AM Naoya Yamashita wrote: > I found src/eval.c (let) has redundant conditions, that compares > the length of the list with the current index and also checks if > the current list is cons. Technically, those aren't redundant. We're calling eval_sub in between the checks, and that might modify the list of arguments. That's not something that is supported, but it is something that shouldn't segfault, just throw an error. IIUC, the following will likely segfault with your patch: (let ((cons-cell '((a 2) (b 3)))) (eval `(let ((x (setcdr ',cons-cell nil)) . ,cons-cell) (message "foo")))) Again, that's not code that should work. It isn't quite nasty enough to justify a segfault, though, IMHO. Pip