[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 2006752: Avoid unnecessary failures of auto-savin
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 2006752: Avoid unnecessary failures of auto-saving after fatal error |
Date: |
Mon, 11 Jan 2016 16:01:14 +0000 |
branch: emacs-25
commit 200675299e24139ccce444a7ca5d59a2aed2891c
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid unnecessary failures of auto-saving after fatal error
* src/w32.c (map_w32_filename): Avoid non-trivial system calls for
the benefit of FAT volumes if we are called as part of shutting
down due to a fatal error, which probably means we are trying to
auto-save the session.
* src/lread.c (check_obarray): Don't bother making the obarray
valid if we are shutting down due to a fatal error. This avoids
interfering with auto-saving the crashed session.
---
src/lread.c | 6 +++++-
src/w32.c | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/lread.c b/src/lread.c
index e9f3d7d..25e3ff0 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3720,7 +3720,11 @@ static size_t oblookup_last_bucket_number;
Lisp_Object
check_obarray (Lisp_Object obarray)
{
- if (!VECTORP (obarray) || ASIZE (obarray) == 0)
+ /* We don't want to signal a wrong-type-argument error when we are
+ shutting down due to a fatal error, and we don't want to hit
+ assertions in VECTORP and ASIZE if the fatal error was during GC. */
+ if (!fatal_error_in_progress
+ && (!VECTORP (obarray) || ASIZE (obarray) == 0))
{
/* If Vobarray is now invalid, force it to be valid. */
if (EQ (Vobarray, obarray)) Vobarray = initial_obarray;
diff --git a/src/w32.c b/src/w32.c
index c77ed87..4770718 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -3210,7 +3210,8 @@ map_w32_filename (const char * name, const char ** pPath)
return shortname;
}
- if (is_fat_volume (name, (const char **)&path)) /* truncate to 8.3 */
+ if (!fatal_error_in_progress /* disable fancy processing during crash */
+ && is_fat_volume (name, (const char **)&path)) /* truncate to 8.3 */
{
register int left = 8; /* maximum number of chars in part */
register int extn = 0; /* extension added? */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 2006752: Avoid unnecessary failures of auto-saving after fatal error,
Eli Zaretskii <=