After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790266 - Valadoc.Gtkdocrenderer - infinite uncontrolled recursion
Valadoc.Gtkdocrenderer - infinite uncontrolled recursion
Status: RESOLVED FIXED
Product: valadoc
Classification: Other
Component: libvaladoc
git master
Other All
: Normal critical
: ---
Assigned To: valadoc-maint
valadoc-maint
Depends on:
Blocks:
 
 
Reported: 2017-11-12 21:19 UTC by Jakub Kaszycki
Modified: 2017-11-27 07:38 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
A patch solving the issue (527 bytes, patch)
2017-11-12 21:19 UTC, Jakub Kaszycki
committed Details | Review

Description Jakub Kaszycki 2017-11-12 21:19:21 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.
Comment 1 Rico Tzschichholz 2017-11-27 07:38:18 UTC
Pushed to vala as
https://git.gnome.org/browse/vala/commit/?id=5259f229402894b3495762a97846ded7d0b4f5a7