GNOME Bugzilla – Bug 587823
gobject-introspection crashes when building
Last modified: 2015-02-07 16:54:15 UTC
When I try to build gobject-introspection, I get this crash in the gir directory. I am building gobject-introspection from git master on Solaris x86. CC /tmp/tmp-introspectgQAquA/Everything-1.0 make[2]: *** [GIRepository-2.0.typelib] Segmentation Fault (core dumped) I notice that this crash is from tools/g-ir-compiler. When I run gi-ir- compiler in dbx, I see the crash is happening here. [1] strlen(0x6, 0x8047478, 0xfec51bfe, 0xfec4e4ea), at 0xfec0481b [2] _ndoprnt(0x8066118, 0x804761c, 0x8047494, 0x0), at 0xfec50833 [3] vsnprintf(0x80474d4, 0x80, 0x8066118, 0x804761c), at 0xfec5325d [4] vasprintf(0x80475d0, 0x8066118, 0x804761c, 0xfedd86ee), at 0xfec4e1ee [5] g_vasprintf(0x80475d0, 0x8066118, 0x804761c, 0xfedc5dd6), at 0xfedd870b [6] g_string_append_vprintf(0x883f4c0, 0x8066118, 0x804761c, 0xfedc5f34), at 0xfedc5dff [7] g_string_append_printf(0x883f4c0, 0x8066118, 0x6, 0x8079274, 0x0, 0x0), at 0xfedc5f4d =>[8] serialize_type(module = 0x82e69d0, modules = 0x83ce360, node = 0x80a7128, str = 0x883f4c0), line 1250 in "girnode.c" [9] serialize_type(module = 0x82e69d0, modules = 0x83ce360, node = 0x80a7058, str = 0x883f4c0), line 1305 in "girnode.c" [10] g_ir_node_build_typelib(node = 0x80a7058, parent = 0x80a6ef8, build = 0x804788c, offset = 0x804781c, offset2 = 0x80478c4), line 1453 in "girnode.c" [11] g_ir_node_build_typelib(node = 0x80a6ef8, parent = (nil), build = 0x804788c, offset = 0x80478c8, offset2 = 0x80478c4), line 1657 in "girnode.c" [12] g_ir_module_build_typelib(module = 0x82e69d0, modules = 0x83ce360), line 359 in "girmodule.c" [13] main(argc = 1, argv = 0x804796c), line 278 in "compiler.c" Here is line 1249 of girnode.c where the crash seems to be happening: 1247 if (node->tag < GI_TYPE_TAG_ARRAY) 1248 { 1249 g_string_append_printf (str, "%s%s", basic[node->tag], 1250 node->is_pointer ? "*" : ""); The reason for the crash is that node->tag is 23, but basic[23] is uninitialized. basic[22] is the highest value that is initialized. Looking at girepository.h at the GiTypeTag structure, I notice that GI_TYPE_TAG_ARRAY is 24. However the basic array in the serialize_type function in girnode.c only has 22 elements. I suspect this is the reason? Should not the basic array in serialize_type in girnode.c match up with the GiTypeTag in girepository.h? Note sure how to fix this, but wanted to highlight the issue.
fixed
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]