unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Naoya Yamashita <conao3@gmail.com>
Cc: eliz@gnu.org, emacs-devel@gnu.org
Subject: Re: [PATCH] * src/eval.c: Stop checking for nvars, and use only CONSP
Date: Tue, 2 Mar 2021 07:30:47 +0000	[thread overview]
Message-ID: <CAOqdjBdCPLFs_B3bL0C3OHtwHNHXEtw81aDMdR02vB-fTUNzrA@mail.gmail.com> (raw)
In-Reply-To: <20210302.161418.2185996023660309707.conao3@gmail.com>

On Tue, Mar 2, 2021 at 7:15 AM Naoya Yamashita <conao3@gmail.com> wrote:
> My patched Emacs does not segfault the Pip example either.
>
>     (let ((cons-cell '((a 2) (b 3))))
>       (eval `(let ((x (setcdr ',cons-cell nil))
>                . ,cons-cell)
>            (message "foo"))))
>     ;;=> foo

Sorry, I had misunderstood what you were changing about the code. This crashes:

(let ((cell '((a 3))))
  (eval `(let ((a (setcdr ',cell ',cell)) . ,cell)
           (message "foo"))))

(Please keep in mind such crashes are hard to predict; if I wrote my
example the way I intended, it should exhaust the stack on pretty much
all machines, but it might still work, by sheer accident, on yours).

Pip



  reply	other threads:[~2021-03-02  7:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02  2:10 [PATCH] * src/eval.c: Stop checking for nvars, and use only CONSP Naoya Yamashita
2021-03-02  2:48 ` Stefan Monnier
2021-03-02  3:09   ` Naoya Yamashita
2021-03-02 14:31     ` Stefan Monnier
2021-03-02 15:19       ` Pip Cet
2021-03-02 15:48         ` Stefan Monnier
2021-03-02 17:04           ` Pip Cet
2021-03-02 17:44             ` Stefan Monnier
2021-03-02 19:50               ` Pip Cet
2021-03-02 23:48                 ` Stefan Monnier
2021-03-02  5:34 ` Pip Cet
2021-03-02  5:41 ` Eli Zaretskii
2021-03-02  7:14   ` Naoya Yamashita
2021-03-02  7:30     ` Pip Cet [this message]
2021-03-02 14:00     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOqdjBdCPLFs_B3bL0C3OHtwHNHXEtw81aDMdR02vB-fTUNzrA@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=conao3@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).