diff options
| author | Paul Eggert | 2013-07-16 14:49:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-16 14:49:32 -0700 |
| commit | 41d48a42df6ce4e5af9543f97313e256f16aa900 (patch) | |
| tree | 2c23587c2691d181eb1561ee7347924887f73e53 /src/ChangeLog | |
| parent | 27e498e6e5fea8ac64c90ac13678b537b7b12302 (diff) | |
| download | emacs-41d48a42df6ce4e5af9543f97313e256f16aa900.tar.gz emacs-41d48a42df6ce4e5af9543f97313e256f16aa900.zip | |
Fix bug where insert-file-contents closes a file twice.
* fileio.c (close_file_unwind): Don't close if FD is negative;
this can happen when unwinding a zapped file descriptor.
(Finsert_file_contents): Unwind-protect the fd before the point marker,
in case Emacs runs out of memory between the two unwind-protects.
Don't trash errno when closing FD.
Zap the FD in the specpdl when closing it, instead of deferring
the removal of the unwind-protect; this fixes a bug where a child
function unwinds the stack past us.
Fixes: debbugs:14839
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8474e8aa5e4..ab90682aa67 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,15 @@ | |||
| 1 | 2013-07-16 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2013-07-16 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Fix bug where Emacs tries to close a file twice (Bug#14839). | ||
| 4 | * fileio.c (close_file_unwind): Don't close if FD is negative; | ||
| 5 | this can happen when unwinding a zapped file descriptor. | ||
| 6 | (Finsert_file_contents): Unwind-protect the fd before the point marker, | ||
| 7 | in case Emacs runs out of memory between the two unwind-protects. | ||
| 8 | Don't trash errno when closing FD. | ||
| 9 | Zap the FD in the specpdl when closing it, instead of deferring | ||
| 10 | the removal of the unwind-protect; this fixes a bug where a child | ||
| 11 | function unwinds the stack past us. | ||
| 12 | |||
| 3 | New unwind-protect flavors to better type-check C callbacks. | 13 | New unwind-protect flavors to better type-check C callbacks. |
| 4 | This also lessens the need to write wrappers for callbacks, | 14 | This also lessens the need to write wrappers for callbacks, |
| 5 | and the need for make_save_pointer. | 15 | and the need for make_save_pointer. |