Summary: | update-mime-database segfaults with libxml2-2.6.21 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Daniel Thaler <daniel> |
Component: | Current packages | Assignee: | Heinrich Wendel (RETIRED) <lanius> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | gnome, griffon26 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch for shared-mime-info to not call xmlfree with NULL
Patch for libxml2 to give an error instead of segfaulting when freeing NULL |
Description
Daniel Thaler
2005-09-10 14:50:59 UTC
I tried to fix this by putting an if(lang) in front of the xmlfree, but now I'm getting a zillion of these lines: "element comment: error : Reference to default namespace not in scope" interspersed with a couple of these: "element alias: error : Reference to default namespace not in scope" Created attachment 68146 [details, diff]
Patch for shared-mime-info to not call xmlfree with NULL
I rebuilt libxml2 without the debug USE flag and now everything is working
perfectly. The attached patch is all you need.
That patch is probably good to have too; however update-mime-database _works_ with previous versions of libxml2, where passing NULL is not fatal. I think this crash in update-mime-database is merely a symptom of a libxml2 bug, rather than something that needs fixing in shared-mime-info Created attachment 68166 [details, diff]
Patch for libxml2 to give an error instead of segfaulting when freeing NULL
You're right that it is probably a good idea to check for NULL in xmlMemFree,
because it helps debugging, but I would not say it's a bug. If it were a bug,
you'd also have to check for any other pointer value that's invalid at the time
of the call.
I've taken a look at libxml2 and there doesn't seem to be any difference in the source between 2.6.20 and 2.6.21 as far as memory functions is concerned. So it would seem that the reason that we see this crash now is because of the options passed to configure in the 2.6.21 ebuild. Gnome people, please consider the libxml2 patch. this bug appears to be a duplicate of 105120 (comment #10) *** This bug has been marked as a duplicate of 105120 *** |