We got a report of gnome-shell crashing when libgweather is trying to parse malformed XML after gnome-shell has previously called (via gnome-desktop) something like:
rxkb_context_new();
rxkb_context_parse();
rxkb_context_unref();
rxkb_context_parse() calls xmlSetGenericErrorFunc() via parse() to set the global libxml2 error handler to its xml_error_func(), which depends on a valid rxkb_context. The context however is no longer valid after rxkb_context_unref(), while the error handler is still pointing to xml_error_func() . This then results in a crash whenever something causes libxml2 to trigger an error afterwards, such as libgweather in the gnome-shell report.
parse() should restore the default error handler after it is done parsing.
We got a report of gnome-shell crashing when libgweather is trying to parse malformed XML after gnome-shell has previously called (via
gnome-desktop) something like:rxkb_context_parse()callsxmlSetGenericErrorFunc()viaparse()to set the global libxml2 error handler to itsxml_error_func(), which depends on a validrxkb_context. The context however is no longer valid afterrxkb_context_unref(), while the error handler is still pointing toxml_error_func(). This then results in a crash whenever something causes libxml2 to trigger an error afterwards, such as libgweather in the gnome-shell report.parse()should restore the default error handler after it is done parsing.