diff options
| author | Eli Zaretskii | 2016-09-14 20:41:04 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-09-14 20:41:04 +0300 |
| commit | 5ad238bf28f67304b942f03d3d5fc8d14d1268a8 (patch) | |
| tree | 0a5de6a3f71f27f287f7869a7d38a13f5917203c /src | |
| parent | def4f1ec992880de599d36a0f94536249d95d7c4 (diff) | |
| download | emacs-5ad238bf28f67304b942f03d3d5fc8d14d1268a8.tar.gz emacs-5ad238bf28f67304b942f03d3d5fc8d14d1268a8.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 9 | ||||
| -rw-r--r-- | src/eval.c | 1 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/print.c | 3 |
4 files changed, 0 insertions, 14 deletions
diff --git a/src/alloc.c b/src/alloc.c index 5bbd5e55c42..1092a34801a 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -231,12 +231,6 @@ EMACS_INT memory_full_cons_threshold; | |||
| 231 | 231 | ||
| 232 | bool gc_in_progress; | 232 | bool gc_in_progress; |
| 233 | 233 | ||
| 234 | /* True means abort if try to GC. | ||
| 235 | This is for code which is written on the assumption that | ||
| 236 | no GC will happen, so as to verify that assumption. */ | ||
| 237 | |||
| 238 | bool abort_on_gc; | ||
| 239 | |||
| 240 | /* Number of live and free conses etc. */ | 234 | /* Number of live and free conses etc. */ |
| 241 | 235 | ||
| 242 | static EMACS_INT total_conses, total_markers, total_symbols, total_buffers; | 236 | static EMACS_INT total_conses, total_markers, total_symbols, total_buffers; |
| @@ -5675,9 +5669,6 @@ garbage_collect_1 (void *end) | |||
| 5675 | Lisp_Object retval = Qnil; | 5669 | Lisp_Object retval = Qnil; |
| 5676 | size_t tot_before = 0; | 5670 | size_t tot_before = 0; |
| 5677 | 5671 | ||
| 5678 | if (abort_on_gc) | ||
| 5679 | emacs_abort (); | ||
| 5680 | |||
| 5681 | /* Can't GC if pure storage overflowed because we can't determine | 5672 | /* Can't GC if pure storage overflowed because we can't determine |
| 5682 | if something is a pure object or not. */ | 5673 | if something is a pure object or not. */ |
| 5683 | if (pure_bytes_used_before_overflow) | 5674 | if (pure_bytes_used_before_overflow) |
diff --git a/src/eval.c b/src/eval.c index f681ef7c278..e08a25a31a0 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) | |||
| 1497 | struct handler *h; | 1497 | struct handler *h; |
| 1498 | 1498 | ||
| 1499 | immediate_quit = 0; | 1499 | immediate_quit = 0; |
| 1500 | abort_on_gc = 0; | ||
| 1501 | if (gc_in_progress || waiting_for_input) | 1500 | if (gc_in_progress || waiting_for_input) |
| 1502 | emacs_abort (); | 1501 | emacs_abort (); |
| 1503 | 1502 | ||
diff --git a/src/lisp.h b/src/lisp.h index 29ed9fe8a2d..d3331861fe3 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3729,7 +3729,6 @@ extern struct Lisp_Vector *allocate_pseudovector (int, int, int, | |||
| 3729 | VECSIZE (type), tag)) | 3729 | VECSIZE (type), tag)) |
| 3730 | 3730 | ||
| 3731 | extern bool gc_in_progress; | 3731 | extern bool gc_in_progress; |
| 3732 | extern bool abort_on_gc; | ||
| 3733 | extern Lisp_Object make_float (double); | 3732 | extern Lisp_Object make_float (double); |
| 3734 | extern void display_malloc_warning (void); | 3733 | extern void display_malloc_warning (void); |
| 3735 | extern ptrdiff_t inhibit_garbage_collection (void); | 3734 | extern ptrdiff_t inhibit_garbage_collection (void); |
diff --git a/src/print.c b/src/print.c index d54a7c9bdd1..f3db6748d03 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. */) | |||
| 664 | but we don't want to deactivate the mark just for that. | 664 | but we don't want to deactivate the mark just for that. |
| 665 | No need for specbind, since errors deactivate the mark. */ | 665 | No need for specbind, since errors deactivate the mark. */ |
| 666 | Lisp_Object save_deactivate_mark = Vdeactivate_mark; | 666 | Lisp_Object save_deactivate_mark = Vdeactivate_mark; |
| 667 | bool prev_abort_on_gc = abort_on_gc; | ||
| 668 | abort_on_gc = true; | ||
| 669 | 667 | ||
| 670 | Lisp_Object printcharfun = Vprin1_to_string_buffer; | 668 | Lisp_Object printcharfun = Vprin1_to_string_buffer; |
| 671 | PRINTPREPARE; | 669 | PRINTPREPARE; |
| @@ -687,7 +685,6 @@ A printed representation of an object is text which describes that object. */) | |||
| 687 | 685 | ||
| 688 | Vdeactivate_mark = save_deactivate_mark; | 686 | Vdeactivate_mark = save_deactivate_mark; |
| 689 | 687 | ||
| 690 | abort_on_gc = prev_abort_on_gc; | ||
| 691 | return unbind_to (count, object); | 688 | return unbind_to (count, object); |
| 692 | } | 689 | } |
| 693 | 690 | ||