GNOME Bugzilla – Bug 683403
weird recursion in downloader_fetch_os_logo()
Last modified: 2016-03-31 14:00:57 UTC
I didn't get a crash there yet, but that backtrace is worrisome res=<optimized out>, self=0x16b30e0) at wizard.c:1429
+ Trace 230802
There an intentional recursive call to this function, but I don't think it's expected that it gets this long. This is briefly discussed in the review of bug #682573
Created attachment 225107 [details] [review] downloader: Loop instead of recursing Vala currently doesn't optimize tail-call recursion and since it has to unref/free passed arguments after the call in the generated code, its not exactly tail call in generated code and therefore gcc's '-foptimize-sibling-calls' can't help us either.
Review of attachment 225107 [details] [review]: ::: src/downloader.vala @@ +19,3 @@ + var logo_url = os.logo; + if (logo_url != null) + return logo_url; Might be slightly more readable as if (os.logo != null) return os.logo; var logo_url = null; var derived = ....
Comment on attachment 225107 [details] [review] downloader: Loop instead of recursing Attachment 225107 [details] pushed as 1b2138b - downloader: Loop instead of recursing