emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch to fileio.c


From: Chong Yidong
Subject: Re: patch to fileio.c
Date: Tue, 04 Nov 2008 12:20:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Fabrice Popineau" <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]