diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-03-26 16:44:18 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-03-26 17:11:40 +0100 |
commit | 2dfeea8962751718168494c0560d69e678794b39 (patch) | |
tree | feb733329b75e74f0e3569706a0d17f3dcc79022 /lisp/emacs-lisp/hierarchy.el | |
parent | e96061de95d053a4c5e303c7f75e0e928e474938 (diff) | |
download | emacs-2dfeea8962751718168494c0560d69e678794b39.tar.gz emacs-2dfeea8962751718168494c0560d69e678794b39.tar.bz2 emacs-2dfeea8962751718168494c0560d69e678794b39.zip |
Fix reader infinite recursion for circular mixed-type values
Make sure that the value added to the `read_objects_completed` set is
the one we actually return; previously this wasn't the case for conses
because of an optimisation (bug#54501).
Also add a check for vacuous self-references such as #1=#1# instead of
returning a nonsense value from thin air.
* src/lread.c (read1): Treat numbered conses correctly as described
above. Detect vacuous self-references.
* test/src/lread-tests.el (lread-test-read-and-print)
(lread-test-circle-cases, lread-circle): Add tests.
Diffstat (limited to 'lisp/emacs-lisp/hierarchy.el')
0 files changed, 0 insertions, 0 deletions