unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: eggert@cs.ucla.edu, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 8ba156f: Attempt to avoid crashes in plist-member
Date: Tue, 13 Oct 2015 17:50:17 +0200	[thread overview]
Message-ID: <87mvvm7op2.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <837fmqzsva.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Oct 2015 18:32:41 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: David Kastrup <dak@gnu.org>
>> Cc: Paul Eggert <eggert@cs.ucla.edu>, monnier@iro.umontreal.ca,
>> emacs-devel@gnu.org
>> Date: Tue, 13 Oct 2015 17:08:52 +0200
>> 
>> CONSP only checks some bits on a pointer.  It does not verify that
>> the pointer can be dereferenced into an existing cons cell.  So there is
>> absolutely no need to modify anything between having a true CONSP test
>> and a crashing XCAR.
>
> Yes, well...  I didn't have such a serious calamity in mind.

Shrug.  An accidental collection when the value is currently in a local
variable clearly having to end up in the stack frame seems less likely
to me than an accidental collection at a time when the value was not in
active use but likely only stored in some heap data structure.  Who
marks the structures in those?

If the calamity is indeed premature collection rather than a random
value that was never valid to start with.

-- 
David Kastrup



  reply	other threads:[~2015-10-13 15:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151012170324.17966.77@vcs.savannah.gnu.org>
     [not found] ` <E1ZlgVQ-0004gO-Em@vcs.savannah.gnu.org>
2015-10-13  1:07   ` [Emacs-diffs] master 8ba156f: Attempt to avoid crashes in plist-member Stefan Monnier
2015-10-13  2:42     ` Eli Zaretskii
2015-10-13  3:36       ` Paul Eggert
2015-10-13 14:58         ` Eli Zaretskii
2015-10-13 15:08           ` David Kastrup
2015-10-13 15:32             ` Eli Zaretskii
2015-10-13 15:50               ` David Kastrup [this message]
2015-10-13 15:21           ` Paul Eggert
2015-10-13 15:34             ` Eli Zaretskii
2015-10-13 19:05           ` Stefan Monnier
2015-10-13  8:00       ` Andreas Schwab
2015-10-13 15:01         ` Eli Zaretskii
2015-10-13 10:26       ` David Kastrup
2015-10-13 13:23         ` Stefan Monnier
2015-10-13 13:41           ` David Kastrup
2015-10-13 15:16         ` 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=87mvvm7op2.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).