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 507605 - [patch] gtk_recent_files_menu_populate() does not guard properly against recursion
[patch] gtk_recent_files_menu_populate() does not guard properly against recu...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkRecent
2.12.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
Emmanuele Bassi (:ebassi)
Depends on:
Blocks:
 
 
Reported: 2008-01-06 04:22 UTC by William Pitcock
Modified: 2008-02-13 09:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Fix possible recursion in gtk_recent_files_menu_populate(). (1.56 KB, patch)
2008-01-06 04:24 UTC, William Pitcock
committed Details | Review

Description William Pitcock 2008-01-06 04:22:36 UTC
Steps to reproduce:
1. Install Ubuntu Hardy to get gtk+ 2.12.3.
2. Run pbuilder.
3. Watch as gnome-panel or other gtk+ applications crash in idle_populate_func() due to recursion in gtk_recent_files_menu_populate().


Stack trace:

Thread 1 (process 6302)

  • #0 idle_populate_func
    at /build/buildd/gtk+2.0-2.12.3/gtk/gtkrecentchoosermenu.c line 929
  • #1 gdk_threads_dispatch
    at /build/buildd/gtk+2.0-2.12.3/gdk/gdk.c line 470
  • #2 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #3 ??
    from /usr/lib/libglib-2.0.so.0
  • #4 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #5 IA__gtk_main
    at /build/buildd/gtk+2.0-2.12.3/gtk/gtkmain.c line 1163
  • #6 main

Other information:
Included is a patch to fix this bug.
Comment 1 William Pitcock 2008-01-06 04:24:05 UTC
Created attachment 102256 [details] [review]
Fix possible recursion in gtk_recent_files_menu_populate().
Comment 2 Emmanuele Bassi (:ebassi) 2008-01-07 15:54:38 UTC
patch looks fine.

if you don't have commit access I'll commit it myself as soon as possible.
Comment 3 William Pitcock 2008-01-10 12:34:46 UTC
hi,

that's great. i don't have commit access, so you committing it would be a wonderful idea.
Comment 4 Emmanuele Bassi (:ebassi) 2008-01-10 14:28:03 UTC
fixed in trunk, will backport it to gtk-2-12 as well

2008-01-10  Emmanuele Bassi  <ebassi@gnome.org>

        * gtk/gtkrecentchoosermenu.c:
        (idle_populate_func), (idle_populate_clean_up): Fix possible
        recursion by resetting the idle source id. (#507605, William
        Pitcock)
Comment 5 Sebastian Dröge (slomo) 2008-02-13 08:30:27 UTC
Seems that you forgot to backport it to 2.12 as well... or is there another reason why it isn't there yet? :)
Comment 6 Emmanuele Bassi (:ebassi) 2008-02-13 09:43:25 UTC
mmh, apparently I thought I did commit it to both branches, but turns out it's only in trunk. backported now.

2008-02-13  Emmanuele Bassi  <ebassi@gnome.org>

        Merge from trunk:

        * gtk/gtkrecentchoosermenu.c:
        (idle_populate_func), (idle_populate_clean_up): Fix possible
        recursion by resetting the idle source id. (#507605, William
        Pitcock)