# HG changeset patch # User Chong Yidong # Date 1134593386 0 # Node ID a82dd1079b45274cf381bd74541bdc6feb1bbbd0 # Parent f9d4aaef32b238c3563da1e2880b491d1556a971 * print.c (print_preprocess): Go to a deeper print_depth to avoid print_object loop. diff -r f9d4aaef32b2 -r a82dd1079b45 src/ChangeLog --- a/src/ChangeLog Wed Dec 14 20:11:11 2005 +0000 +++ b/src/ChangeLog Wed Dec 14 20:49:46 2005 +0000 @@ -1,7 +1,13 @@ +2005-12-14 Chong Yidong + + * print.c (print_preprocess): Go to a deeper print_depth to avoid + print_object loop. + 2005-12-14 Kyotaro HORIGUCHI (tiny change) * coding.c (code_convert_region_unwind): GCPRO arg. +>>>>>>> 1.4762 2005-12-12 Jan Dj,Ad(Brv * xfns.c (compute_tip_xy): Calculate root_y the same way as root_x, diff -r f9d4aaef32b2 -r a82dd1079b45 src/print.c --- a/src/print.c Wed Dec 14 20:11:11 2005 +0000 +++ b/src/print.c Wed Dec 14 20:49:46 2005 +0000 @@ -1313,7 +1313,13 @@ /* Give up if we go so deep that print_object will get an error. */ /* See similar code in print_object. */ - if (print_depth >= PRINT_CIRCLE) + /* 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; /* Avoid infinite recursion for circular nested structure