unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: "Fabrice Popineau" <fabrice.popineau@supelec.fr>
Cc: emacs-devel@gnu.org
Subject: Re: patch to fileio.c
Date: Tue, 04 Nov 2008 12:20:29 -0500	[thread overview]
Message-ID: <87zlkfe7c2.fsf@cyd.mit.edu> (raw)
In-Reply-To: <ge21iv$ivt$1@ger.gmane.org> (Fabrice Popineau's message of "Sun,  26 Oct 2008 16:15:28 +0100")

"Fabrice Popineau" <fabrice.popineau@supelec.fr> writes:

> You should consider adding the following patch. As I reported earlier,
> the fd file descriptor may be closed twice in insert-file-contents. It
> happens every time a file is visited and this same file is modified
> outside emacs. In this case, you can ask to visit the file again (or
> emacs will ask you if you try to save it)
>
> "File foobar.txt changed on disk. Reread from disk? (yes or no)"
>
> The fd file descriptor in this case is closed by emacs_close() at line
> 3654 and by close_file_unwind() registered at line 3233. When
> emacs_close(fd) is reached, the unwind_protect registered function
> should be removed. Unfortunately, in the mean time other stuff has
> been put in the unwind_protect stack, so you can't just decrement the
> pointer. It can be done when the handled: label is reached. Hence the
> flag in my patch.

Thanks for the patch.  Your analysis sounds correct.

However, I would like to test it first.  Do you have a recipe for
demonstrating incorrect specpdl_ptr handling (e.g. a crash)?




  reply	other threads:[~2008-11-04 17:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26 15:15 patch to fileio.c Fabrice Popineau
2008-11-04 17:20 ` Chong Yidong [this message]
2008-11-07  0:17   ` Fabrice Popineau
2008-11-13 15:43     ` Chong Yidong
2008-11-14 19:01       ` Eli Zaretskii
2008-11-14 21:11 ` Chong Yidong
2008-11-14 21:16   ` Chong Yidong
2008-11-14 22:28     ` Juanma Barranquero

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=87zlkfe7c2.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=fabrice.popineau@supelec.fr \
    /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).