# HG changeset patch # User Chong Yidong # Date 1134834376 0 # Node ID b40bbd9c913afe715442deaae9c5bf4291e34ce2 # Parent 70e76c30ddcc7beef6c90a022d75e81e08800323 * print.c (print_preprocess): Just signal an error if print_depth is exceeded. diff -r 70e76c30ddcc -r b40bbd9c913a src/ChangeLog --- a/src/ChangeLog Sat Dec 17 15:45:55 2005 +0000 +++ b/src/ChangeLog Sat Dec 17 15:46:16 2005 +0000 @@ -1,3 +1,8 @@ +2005-12-17 Chong Yidong + + * print.c (print_preprocess): Just signal an error if print_depth + is exceeded. + 2005-12-17 Eli Zaretskii * .gdbinit: Set a breakpoint on w32_abort. diff -r 70e76c30ddcc -r b40bbd9c913a src/print.c --- a/src/print.c Sat Dec 17 15:45:55 2005 +0000 +++ b/src/print.c Sat Dec 17 15:46:16 2005 +0000 @@ -1313,14 +1313,8 @@ /* Give up if we go so deep that print_object will get an error. */ /* See similar code in print_object. */ - /* Because print_preprocess "follows" nested lists in a slightly - different order from print_object, there is a risk of giving up - too soon. In that case, a deeply nested circular list may cause - print_object to loop. Using 3 * PRINT_CIRCLE should make this - possibility negligible, but at some point someone will have to - sit down and do a more careful analysis. -- cyd */ - if (print_depth >= 3 * PRINT_CIRCLE) - return; + if (print_depth >= PRINT_CIRCLE) + error ("Apparently circular structure being printed"); /* Avoid infinite recursion for circular nested structure in the case where Vprint_circle is nil. */