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 711541 - Fix crash in girnode.c if a namespace can’t be found
Fix crash in girnode.c if a namespace can’t be found
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.38.x
Other All
: Normal major
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-11-06 11:37 UTC by Philip Withnall
Modified: 2015-02-07 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
girnode: Fix a NULL pointer deference if a namespace can’t be found (1.08 KB, patch)
2013-11-06 11:38 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2013-11-06 11:37:37 UTC
Small patch coming up to fix a NULL pointer dereference when finding a node if the node’s namespace can’t be found.
Comment 1 Philip Withnall 2013-11-06 11:38:12 UTC
Created attachment 259064 [details] [review]
girnode: Fix a NULL pointer deference if a namespace can’t be found
Comment 2 Colin Walters 2013-11-06 13:37:03 UTC
Review of attachment 259064 [details] [review]:

Hmm, under what conditions can this happen?  I suspect this is for girs generated from vala?  Can it (also) be patched to not emit unknown namespace references?
Comment 3 Philip Withnall 2013-11-06 14:42:47 UTC
Comment on attachment 259064 [details] [review]
girnode: Fix a NULL pointer deference if a namespace can’t be found

commit 6838e9313ad70781ac1316a05babbbf724ecfccc
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Wed Nov 6 11:37:50 2013 +0000

    girnode: Fix a NULL pointer deference if a namespace can’t be found
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711541

 girepository/girnode.c | 5 +++++
 1 file changed, 5 insertions(+)
Comment 4 Philip Withnall 2013-11-06 14:46:21 UTC
(In reply to comment #2)
> Hmm, under what conditions can this happen?  I suspect this is for girs
> generated from vala?  Can it (also) be patched to not emit unknown namespace
> references?

This was for a GIR generated by Vala (in libfolks), but there was also a bug in libfolks. Basically, we had all our code in one namespace (‘Dummyf’) and wanted the GIR in another namespace (‘FolksDummy’). We used the gir_namespace attribute in Vala to change the namespace name, but it didn’t change all the references in the namespace’s children.

It’s probably a fairly icky and corner-case bug to fix, and I don’t think it’s worth anyone’s time. It’s a much better idea to just fix libfolks to not do such silly things (which I have done).

Fixing gobject-introspection means it prints a nice error message, though, instead of crashing.

If you think it’s really important, I can track down and fix the Vala bug, but I’d really rather not.
Comment 5 André Klapper 2015-02-07 16:48:57 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]