GNOME Bugzilla – Bug 701156
testgobject assumes that the priv data follows the instance data
Last modified: 2017-11-17 18:50:54 UTC
Commit https://git.gnome.org/browse/glib/commit/?id=31fde56 changes the way private and instance data are laid out in memory and this breaks the assumption in `testgobject' that the pointer to the private data must be greater than the instance data pointer + the instance data size.
Created attachment 245493 [details] [review] tests: Don't assume that private data follows the instance data Commit 31fde56 changed the way the private data is laid out in memory by putting it *before* the instance data to keep the offsets fixed regardless of the number of many subclasses. This means that the invariant testgobject was verifying is no longer true and the failing tests can be safely dropped.
Created attachment 246694 [details] [review] tests: Re-wire the testgobject test program to the build system After the build system rework in commit f9eb9e testgobject fell through the cracks and was not built since then. Re-enable it, even if it is currently failing due to commit 31fde56.
Created attachment 246695 [details] [review] tests: Don't assume that private data follows the instance data Commit 31fde56 changed the way the private data is laid out in memory by putting it *before* the instance data to keep the offsets fixed regardless of the number of many subclasses. This means that the invariant testgobject was verifying is no longer true and the failing tests can be safely dropped.
Review of attachment 246695 [details] [review]: Looks legit.
Review of attachment 246694 [details] [review]: ::: tests/gobject/Makefile.am @@ +43,3 @@ defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h +testgobject_SOURCES = testgobject.c This also needs to be added to meson.build, but I’ll do that before I push it.
Attachment 246694 [details] pushed as e73831d - tests: Re-wire the testgobject test program to the build system Attachment 246695 [details] pushed as edcabe1 - tests: Don't assume that private data follows the instance data
Thanks! <3