* Recent change in filio.c causes crashes
@ 2007-06-28 14:36 Stefan Monnier
2007-06-28 19:26 ` Richard Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2007-06-28 14:36 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
The change below causes crashes under my Debian testing version of
GNU/Linux, where glibc complains about double-free in fclose.
The commit log only mentions the docstring change, but not the code change,
so I presume the code change was a simple oversight (the stream is already
properly closed from an unwind handler), but I'd rather have your opinion
before reverting it.
Stefan
revision 1.582
date: 2007-06-27 19:30:02 -0400; author: rms; state: Exp; lines: +5 -2; commitid: bXZP137DmjaWIBns;
(syms_of_fileio) <after-insert-file-functions>: Doc fix.
----------------------------
Index: src/fileio.c
===================================================================
RCS file: /sources/emacs/emacs/src/fileio.c,v
retrieving revision 1.581
retrieving revision 1.582
diff -u -r1.581 -r1.582
--- src/fileio.c 8 Jun 2007 20:12:52 -0000 1.581
+++ src/fileio.c 27 Jun 2007 23:30:02 -0000 1.582
@@ -6021,6 +6021,8 @@
/* Prevent another auto save till enough input events come in. */
record_auto_save ();
+ if (stream != NULL)
+ fclose (stream);
if (auto_saved && NILP (no_message))
{
@@ -6683,8 +6685,9 @@
DEFVAR_LISP ("after-insert-file-functions", &Vafter_insert_file_functions,
doc: /* A list of functions to be called at the end of `insert-file-contents'.
-Each is passed one argument, the number of characters inserted.
-It should return the new character count, and leave point the same.
+Each is passed one argument, the number of characters inserted,
+with point at the start of the inserted text. Each function
+should leave point the same, and return the new character count.
If `insert-file-contents' is intercepted by a handler from
`file-name-handler-alist', that handler is responsible for calling the
functions in `after-insert-file-functions' if appropriate. */);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Recent change in filio.c causes crashes
2007-06-28 14:36 Recent change in filio.c causes crashes Stefan Monnier
@ 2007-06-28 19:26 ` Richard Stallman
2007-06-28 20:19 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-06-28 19:26 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
I did not realize there was another change in the file
when I checked it in.
However, someone thought that that change was needed to fix
another problem. If it is incorrect, the problem may need
some other fix. Can you look through emacs-devel to find
another message about `fclose'?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Recent change in filio.c causes crashes
2007-06-28 19:26 ` Richard Stallman
@ 2007-06-28 20:19 ` Stefan Monnier
2007-06-29 5:10 ` Richard Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2007-06-28 20:19 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
> I did not realize there was another change in the file
> when I checked it in.
> However, someone thought that that change was needed to fix
> another problem. If it is incorrect, the problem may need
> some other fix. Can you look through emacs-devel to find
> another message about `fclose'?
It seems to come from the thread "huge files in ~/.emacs.d/auto-save-list/"
in gnu.emacs.bug where you suggested to the OP to try and run this patch in
the hope it would help track down the bug.
So I think it's clear I can revert it, and whenever the OP's problem is
tracked down, we will install the right fix (which will probably be very
different).
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Recent change in filio.c causes crashes
2007-06-28 20:19 ` Stefan Monnier
@ 2007-06-29 5:10 ` Richard Stallman
0 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2007-06-29 5:10 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
So I think it's clear I can revert it, and whenever the OP's problem is
tracked down, we will install the right fix (which will probably be very
different).
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-29 5:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 14:36 Recent change in filio.c causes crashes Stefan Monnier
2007-06-28 19:26 ` Richard Stallman
2007-06-28 20:19 ` Stefan Monnier
2007-06-29 5:10 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.