From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Concurrency has landed
Date: Fri, 23 Dec 2016 17:51:45 -0800 [thread overview]
Message-ID: <eea2eab4-c0c8-aeaa-ec49-a399449cd68e@cs.ucla.edu> (raw)
In-Reply-To: <jwvpokib1ax.fsf-monnier+gmane.emacs.devel@gnu.org>
Stefan Monnier wrote:
> I really
> can't imagine an architecture where "p1 - p2" is valid C code (i.e. both
> p1 and p2 point inside the same object) and works before `free` yet it
> doesn't give the same answer after `free`.
That's not what the code in question does. p1 addresses a newly allocated
object, and p2 is a dangling pointer that addresses the old (freed) object.
The problem with -fcheck-pointer-bounds does not occur when the program computes
p1 - p2, as the program still gets a valid integer. The problem occurs later,
when Emacs computes q + (p1 - p2), where q is a dangling pointer into the old
object. On conventional architectures this has the same value as (q - p2) + p1,
but that's not true with -fcheck-pointer-bounds, which attaches q's bounds
(which are now invalid) to the resulting pointer.
next prev parent reply other threads:[~2016-12-24 1:51 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 14:45 Please test the merge of the concurrency branch Eli Zaretskii
2016-12-09 15:30 ` Robert Marshall
2016-12-09 16:26 ` Eli Zaretskii
2016-12-09 16:40 ` Paul Eggert
2016-12-09 16:54 ` Eli Zaretskii
2016-12-09 16:58 ` jpff
2016-12-09 17:06 ` Eli Zaretskii
2016-12-09 16:52 ` Robert Marshall
2016-12-09 23:09 ` Clément Pit--Claudel
2016-12-10 7:14 ` Eli Zaretskii
2016-12-10 15:05 ` Clément Pit--Claudel
2016-12-10 15:50 ` Eli Zaretskii
2016-12-09 22:33 ` David Caldwell
2016-12-10 6:50 ` Eli Zaretskii
2016-12-10 13:14 ` Alan Third
2016-12-10 14:06 ` Eli Zaretskii
2016-12-09 22:58 ` Karl Fogel
2016-12-10 7:09 ` Eli Zaretskii
2016-12-12 3:05 ` Karl Fogel
2016-12-09 23:19 ` Andrés Ramírez
2016-12-10 7:14 ` Eli Zaretskii
2016-12-10 8:09 ` Andreas Politz
2016-12-10 9:07 ` Eli Zaretskii
2016-12-10 16:05 ` Joseph Mingrone
2016-12-10 17:50 ` Eli Zaretskii
2016-12-10 16:33 ` Achim Gratz
2016-12-10 16:56 ` Filipe Silva
2016-12-10 17:56 ` Eli Zaretskii
2016-12-10 17:52 ` Eli Zaretskii
2016-12-10 17:36 ` Concurrency has landed (was: Please test the merge of the concurrency branch) Eli Zaretskii
2016-12-10 18:24 ` Concurrency has landed Eli Zaretskii
2016-12-10 18:26 ` raman
2016-12-10 18:36 ` Eli Zaretskii
2016-12-10 19:22 ` Paul Eggert
2016-12-22 4:52 ` Daniel Colascione
2016-12-22 19:23 ` Paul Eggert
2016-12-22 19:32 ` Daniel Colascione
2016-12-22 19:56 ` Paul Eggert
2016-12-24 0:52 ` Stefan Monnier
2016-12-24 1:51 ` Paul Eggert [this message]
2016-12-24 4:49 ` Stefan Monnier
2016-12-24 5:04 ` Paul Eggert
2016-12-22 19:57 ` Davis Herring
2016-12-13 12:28 ` Phillip Lord
2016-12-13 16:09 ` Eli Zaretskii
2016-12-11 2:51 ` Please test the merge of the concurrency branch Ken Raeburn
2016-12-11 3:33 ` Eli Zaretskii
2016-12-11 19:40 ` Peter Wang
2016-12-11 20:31 ` Eli Zaretskii
2016-12-11 9:11 ` Michael Albinus
2016-12-11 13:54 ` Ken Raeburn
2016-12-11 15:14 ` Tramp and concurrency (was: Please test the merge of the concurrency branch) Michael Albinus
2016-12-11 15:45 ` Please test the merge of the concurrency branch Eli Zaretskii
2016-12-11 18:30 ` Daimrod
2016-12-11 18:42 ` Eli Zaretskii
2016-12-11 19:02 ` Daimrod
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=eea2eab4-c0c8-aeaa-ec49-a399449cd68e@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--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).