1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-15 07:41:09 -08:00
emacs/test/src
Mattias Engdegård 97400c4c24 Make printing mostly non-recursive (bug#55481)
Introduce explicit stacks for traversing common data types during
printing: conses, vectors, records, byte-code, hash-tables and
char-tables, all previously traversed using recursion in C.  This
greatly reduces the risk of crashing Emacs from C stack overflow
when printing deeply nested data.

* src/print.c (Fprinc, print, PRINT_CIRCLE_CANDIDATE_P):
Special-case Fprinc with a plain string argument to eliminate the need
for keeping track of print_depth during the preprocessing phase.
This also improves performance.
(struct print_pp_entry, struct print_pp_stack, ppstack)
(grow_pp_stack, pp_stack_push_value, pp_stack_push_values)
(pp_stack_empty_p, pp_stack_pop):
New stack for preprocessing.
(print_preprocess):
Make mostly nonrecursive, except for string properties.
(enum print_entry_type, struct print_stack_entry)
(struct print_stack, prstack, grow_print_stack)
(print_stack_push, print_stack_push_vector):
New stack for printing.
(print_vectorlike, print_object):
Make mostly nonrecursive, except for string properties and some less
heavily used types.
* test/src/print-tests.el (print-deeply-nested):
New test.
2022-05-18 10:40:15 +02:00
..
comp-resources Silence byte-compiler slightly in tests 2022-01-27 04:25:08 +01:00
emacs-module-resources Decouple mod-test.c from Gnulib 2022-03-08 18:51:18 -08:00
lread-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
regex-resources ; Fix more typos 2020-10-03 12:53:51 +02:00
syntax-resources Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
alloc-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
buffer-tests.el Adjust restore-buffer-modified-p autosaved logic 2022-05-12 02:16:38 +02:00
callint-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
callproc-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
casefiddle-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
character-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
charset-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
chartab-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
cmds-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
coding-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
comp-tests.el Merge from origin/emacs-28 2022-02-10 06:56:22 +01:00
data-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
decompress-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
doc-tests.el Adjust doc-tests-documentation/autoloaded-macro 2022-02-20 17:42:21 +01:00
editfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
emacs-module-tests.el Decouple mod-test.c from Gnulib 2022-03-08 18:51:18 -08:00
emacs-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
eval-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
fileio-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
filelock-tests.el Extend filelock-tests.el for bug#53207 2022-01-31 15:26:06 +01:00
floatfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
fns-tests.el Faster string-lessp for unibyte arguments 2022-04-04 09:49:31 +02:00
font-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
image-tests.el ; Pacify some --without-x byte-compiler warnings. 2022-05-07 20:18:51 +03:00
indent-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
inotify-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
json-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
keyboard-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
keymap-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
lcms-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
lread-tests.el Fix reader infinite recursion for circular mixed-type values 2022-03-26 17:11:40 +01:00
marker-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
minibuf-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
print-tests.el Make printing mostly non-recursive (bug#55481) 2022-05-18 10:40:15 +02:00
process-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
regex-emacs-tests.el Audit quoting the quote character in doc strings 2022-04-22 16:17:22 +02:00
search-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
sqlite-tests.el Allow inserting and selecting binary blobs from sqlite 2022-04-28 14:58:53 +02:00
syntax-tests.el Fix Fchar_syntax for non-ASCII in unibyte buffers 2022-01-20 11:44:07 +01:00
textprop-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
thread-tests.el Rewrite thread context switch code (bug#48990) 2022-02-12 15:25:53 -05:00
timefns-tests.el Support (encode-time (list s m h D M Y)) 2022-04-25 12:40:20 -07:00
undo-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
xdisp-tests.el Allow redirecting `message' output to a different buffer 2022-01-29 17:24:49 +01:00
xfaces-tests.el Don't accept whitespace or hex floats in rgbi: colour specs 2022-03-06 14:07:26 +01:00
xml-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00