GNOME Bugzilla – Bug 790266
Valadoc.Gtkdocrenderer - infinite uncontrolled recursion
Last modified: 2017-11-27 07:38:23 UTC
Created attachment 363458 [details] [review] A patch solving the issue The Valadoc utility seems to choke on links in some occasions. In my case, I tried to put a class link in a class description. Valadoc makes a rain of criticals and does a SEGV. When debugging it with GDB, I noticed an infinite recursion (there were about 23000 stack frames repeating like A-B-A-B). After investigating the problem, I noticed the possible place which could cause the bug. Valadoc.GtkdocRenderer.visit_symbol_link(SymbolLink) consists of an if statement. Both clauses have a recursive call to visit_symbol_link() with the same parameter. I think this is a typo for write_symbol_link(), because after replacing it as mentioned, it works perfectly. I have attached a patch. It is possible that similar bugs exist in more places in the source, so this patch might not be complete, but it certainly solves one of the problems.
Pushed to vala as https://git.gnome.org/browse/vala/commit/?id=5259f229402894b3495762a97846ded7d0b4f5a7