Commit 5ad238bf authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

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)
parent def4f1ec
......@@ -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)
......
......@@ -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 ();
......
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment