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 647097 - Variable arguments do not work with constructor
Variable arguments do not work with constructor
Status: RESOLVED DUPLICATE of bug 620675
Product: vala
Classification: Core
Component: Methods
0.12.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-07 20:32 UTC by Jim Nelson
Modified: 2012-06-29 17:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jim Nelson 2011-04-07 20:32:34 UTC
varargs don't work with a constructor.  The code compiles fine but the results are unpredictable, from no arguments being found to garbage to segfault.

The reason is that the C function that takes the varargs (the class_new() function) turns around and calls the class_construct() function.  The stack in class_construct() is therefore not in a proper state for vararg processing.

Vala 0.12.
Comment 1 Evan Nemerson 2012-06-29 17:13:41 UTC

*** This bug has been marked as a duplicate of bug 620675 ***