GNOME Bugzilla – Bug 711541
Fix crash in girnode.c if a namespace can’t be found
Last modified: 2015-02-07 16:48:57 UTC
Small patch coming up to fix a NULL pointer dereference when finding a node if the node’s namespace can’t be found.
Created attachment 259064 [details] [review] girnode: Fix a NULL pointer deference if a namespace can’t be found
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 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(+)
(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.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]