emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5ad238b: Avoid aborts in GC due to abort_on_gc


From: Eli Zaretskii
Subject: [Emacs-diffs] master 5ad238b: Avoid aborts in GC due to abort_on_gc
Date: Wed, 14 Sep 2016 17:42:04 +0000 (UTC)

branch: master
commit 5ad238bf28f67304b942f03d3d5fc8d14d1268a8
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Avoid aborts in GC due to abort_on_gc
    
    * src/lisp.h:
    * src/print.c (Fprin1_to_string):
    * src/eval.c (signal_or_quit):
    * src/alloc.c (garbage_collect_1): Remove declarations, setting,
    and testing the value of abort_on_gc.  It is no longer needed, and
    using it causes rare aborts in GC for no good reason.  (Bug#23912)
---
 src/alloc.c |    9 ---------
 src/eval.c  |    1 -
 src/lisp.h  |    1 -
 src/print.c |    3 ---
 4 files changed, 14 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 5bbd5e5..1092a34 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -231,12 +231,6 @@ EMACS_INT memory_full_cons_threshold;
 
 bool gc_in_progress;
 
-/* True means abort if try to GC.
-   This is for code which is written on the assumption that
-   no GC will happen, so as to verify that assumption.  */
-
-bool abort_on_gc;
-
 /* Number of live and free conses etc.  */
 
 static EMACS_INT total_conses, total_markers, total_symbols, total_buffers;
@@ -5675,9 +5669,6 @@ garbage_collect_1 (void *end)
   Lisp_Object retval = Qnil;
   size_t tot_before = 0;
 
-  if (abort_on_gc)
-    emacs_abort ();
-
   /* Can't GC if pure storage overflowed because we can't determine
      if something is a pure object or not.  */
   if (pure_bytes_used_before_overflow)
diff --git a/src/eval.c b/src/eval.c
index f681ef7..e08a25a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1497,7 +1497,6 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object 
data, bool keyboard_quit)
   struct handler *h;
 
   immediate_quit = 0;
-  abort_on_gc = 0;
   if (gc_in_progress || waiting_for_input)
     emacs_abort ();
 
diff --git a/src/lisp.h b/src/lisp.h
index 29ed9fe..d333186 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3729,7 +3729,6 @@ extern struct Lisp_Vector *allocate_pseudovector (int, 
int, int,
                                   VECSIZE (type), tag))
 
 extern bool gc_in_progress;
-extern bool abort_on_gc;
 extern Lisp_Object make_float (double);
 extern void display_malloc_warning (void);
 extern ptrdiff_t inhibit_garbage_collection (void);
diff --git a/src/print.c b/src/print.c
index d54a7c9..f3db674 100644
--- a/src/print.c
+++ b/src/print.c
@@ -664,8 +664,6 @@ A printed representation of an object is text which 
describes that object.  */)
      but we don't want to deactivate the mark just for that.
      No need for specbind, since errors deactivate the mark.  */
   Lisp_Object save_deactivate_mark = Vdeactivate_mark;
-  bool prev_abort_on_gc = abort_on_gc;
-  abort_on_gc = true;
 
   Lisp_Object printcharfun = Vprin1_to_string_buffer;
   PRINTPREPARE;
@@ -687,7 +685,6 @@ A printed representation of an object is text which 
describes that object.  */)
 
   Vdeactivate_mark = save_deactivate_mark;
 
-  abort_on_gc = prev_abort_on_gc;
   return unbind_to (count, object);
 }
 



reply via email to

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