Nullify the gobject cache accessible when the accessible is finalized.
authorAlban Browaeys <prahal@yahoo.com>
Mon, 29 Apr 2013 19:27:23 +0000 (21:27 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 6 May 2013 11:47:25 +0000 (13:47 +0200)
commit1838235ac65ddf47dcd434ef8cbb6cc11ce96699
tree65984725ca6029cb0a13e0547de4a0331e846198
parent98c1ff473a2eea42a4c87519cffd23614f88b6ee
Nullify the gobject cache accessible when the accessible is finalized.

When the gobject is disposed the weak reference finalize
the accessible. But the gobject could still be reference
thus not finalized. As the gobject still holds the accessible
in its qdata, next call to atk_gobject_accessible_for_object
returns the old accessible freed memory. If the caller attempts
to do anything with this memory as if an atkobject it segfaults.

This happens here : gnome-shell segfault when the password prompt
it generates is triggered more than once. As the clutter stage still
 holds a reference to the StIMText, which wasdisposed when the
 password widget was destroyed with the end of the first password
widget, when the second password prompt attempt notify key focus to the
old widget, it gets its accessible (now freed memory) via the StIMText
qdata cache, and pass this to atk_object_notify_state_change.

gobject still hold a pointer to it via qdata.

https://bugzilla.gnome.org/show_bug.cgi?id=699262
atk/atkgobjectaccessible.c