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 617978 - Improve validation for parameter references
Improve validation for parameter references
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-05-06 23:23 UTC by Owen Taylor
Modified: 2015-02-07 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use -1 not None for closure/destroy indices (1.27 KB, patch)
2010-05-06 23:23 UTC, Owen Taylor
committed Details | Review
Validate scope annotation values (2.31 KB, patch)
2010-05-06 23:23 UTC, Owen Taylor
committed Details | Review
Validate parameter references (3.95 KB, patch)
2010-05-06 23:23 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2010-05-06 23:23:17 UTC
Here's some patches that fix problems I had with the scanner
accepting bad input when I was trying to add some (destroy)
and (closure) annotations.
Comment 1 Owen Taylor 2010-05-06 23:23:19 UTC
Created attachment 160475 [details] [review]
Use -1 not None for closure/destroy indices

Don't assign None to closure and destroy indices in case of
collision, they are supposed to be numeric.
Comment 2 Owen Taylor 2010-05-06 23:23:22 UTC
Created attachment 160476 [details] [review]
Validate scope annotation values

Make sure that the value specified for scope in a callback
annotation is one of the legal values.
Comment 3 Owen Taylor 2010-05-06 23:23:25 UTC
Created attachment 160477 [details] [review]
Validate parameter references

When an annotation references another parameter, check that that
parameter actually exists.

Add a comment to the handling of (closure) for callbacks to explain
why we don't need the same handling there despite the use of
get_parameter_index().
Comment 4 Johan (not receiving bugmail) Dahlin 2010-05-07 12:11:07 UTC
Review of attachment 160475 [details] [review]:

Looks good.
Comment 5 Johan (not receiving bugmail) Dahlin 2010-05-07 12:11:08 UTC
Review of attachment 160475 [details] [review]:

Looks good.
Comment 6 Johan (not receiving bugmail) Dahlin 2010-05-07 12:12:35 UTC
Review of attachment 160476 [details] [review]:

Looks great, thanks!
Comment 7 Johan (not receiving bugmail) Dahlin 2010-05-07 12:13:30 UTC
Review of attachment 160477 [details] [review]:

Looks good as well
Comment 8 Owen Taylor 2010-05-07 16:09:27 UTC
Attachment 160475 [details] pushed as 2f7066d - Use -1 not None for closure/destroy indices
Attachment 160476 [details] pushed as a78f828 - Validate scope annotation values
Attachment 160477 [details] pushed as 36c1996 - Validate parameter references
Comment 9 André Klapper 2015-02-07 17:00:07 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]