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 676203 - Async methods don't perform parameter checks
Async methods don't perform parameter checks
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Async
unspecified
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-17 02:08 UTC by Eric Gregory
Modified: 2018-05-22 14:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case demonstrating the issue (246 bytes, text/x-vala)
2012-05-17 02:08 UTC, Eric Gregory
Details

Description Eric Gregory 2012-05-17 02:08:56 UTC
Created attachment 214223 [details]
Test case demonstrating the issue

With normal Vala methods, a sanity check is performed to ensure the parameters are of the expected types.  This doesn't seem to be happening in async methods in Vala 0.17.0

I've attached a test case that demonstrates the issue.  The test() method will fail with "CRITICAL **: test: assertion `s != NULL' failed"

The async version, test_async(), triggers an assertion inside g_utf8_strup() instead.

A quick look at the generated C code shows that test() performs a null check, whereas the methods corresponding with test_async() do not.

Note that I only used the string type here as an example -- the same issue occurs with any type, including Vala classes.
Comment 1 GNOME Infrastructure Team 2018-05-22 14:24:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/299.