GNOME Bugzilla – Bug 719865
object: Don't try to poke at a vfunc pointer in a class that doesn't have it
Last modified: 2013-12-04 20:20:04 UTC
See patch. Spotted by Lionel Landwerlin.
Created attachment 263529 [details] [review] object: Don't try to poke at a vfunc pointer in a class that doesn't have it If a class introduces the vfunc, then we don't have a parent to compare it against to check see it's unchanged, and we know it isn't. This prevents poking in invalid memory and causing valgrind to spew and potentially a crash.
Review of attachment 263529 [details] [review]: Only a minor naming comment, feel free to commit with or without change. ::: gi/object.cpp @@ +397,3 @@ +find_vfunc_on_parents(GIObjectInfo *info, + gchar *name, + gboolean *out_is_on_us) *out_defined_by_parent ? "is_on_us" feels awkward.
Attachment 263529 [details] pushed as 3076907 - object: Don't try to poke at a vfunc pointer in a class that doesn't have it Pushed with the name change.