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 747542 - fix schema compiler error handling for <summary> and <description>
fix schema compiler error handling for <summary> and <description>
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gsettings
unspecified
Other All
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-04-09 02:22 UTC by Allison Karlitskaya (desrt)
Modified: 2015-04-09 02:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsettings: fix schema compiler error handling (2.88 KB, patch)
2015-04-09 02:22 UTC, Allison Karlitskaya (desrt)
committed Details | Review
gsettings: add test for repeated <summary> errors (2.84 KB, patch)
2015-04-09 02:23 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2015-04-09 02:22:52 UTC
Here are a couple of follow-ups to bug 747209.  Bug 747472 needs to be
fixed first in order for the patches to apply.
Comment 1 Allison Karlitskaya (desrt) 2015-04-09 02:22:55 UTC
Created attachment 301171 [details] [review]
gsettings: fix schema compiler error handling

Fix a couple of issues in error handling in glib-compile-schemas.

The first problem is that, in case of repeated <summary> or
<description> tags we were still allocating a GString which was never
being freed (due to the throwing of the error resulting in immediate
termination of the parse).

The second problem is that if the repeated <summary> tag also had
attributes, we would attempt to set the GError twice.
Comment 2 Allison Karlitskaya (desrt) 2015-04-09 02:23:00 UTC
Created attachment 301172 [details] [review]
gsettings: add test for repeated <summary> errors

Make sure error handling on repeated <summary> and <description> is
being done properly, not resulting in glib-compile-schemas throwing a
critical.
Comment 3 Matthias Clasen 2015-04-09 02:30:29 UTC
Review of attachment 301171 [details] [review]:

good catch
Comment 4 Matthias Clasen 2015-04-09 02:31:03 UTC
Review of attachment 301172 [details] [review]:

sure
Comment 5 Allison Karlitskaya (desrt) 2015-04-09 02:36:39 UTC
Attachment 301171 [details] pushed as 7f4fdb5 - gsettings: fix schema compiler error handling
Attachment 301172 [details] pushed as 3fa0a05 - gsettings: add test for repeated <summary> errors