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 625758 - segfault using structs in variadic method calls
segfault using structs in variadic method calls
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Structs
0.9.x
Other Linux
: Urgent blocker
: ---
Assigned To: Vala maintainers
Vala maintainers
wrong-code test-case trivial-patch
Depends on:
Blocks:
 
 
Reported: 2010-08-01 12:51 UTC by Erwin Rol
Modified: 2010-08-20 07:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test prog (450 bytes, application/octet-stream)
2010-08-01 12:51 UTC, Erwin Rol
  Details
Fix passing real non null struct arguments to vararg methods. (2.96 KB, patch)
2010-08-06 08:44 UTC, Luca Bruno
none Details | Review
Fix passing real non null struct arguments to vararg methods. (2.96 KB, patch)
2010-08-19 09:32 UTC, Luca Bruno
none Details | Review

Description Erwin Rol 2010-08-01 12:51:44 UTC
Created attachment 166926 [details]
Test prog

When using struct properties the resulting executable crashes with a sigsegv. 

The attached test prog shows this problem. 

TThe following code is generated;

#line 20 "test.vala"
        g_object_set ((GObject*) tc, "test_struct", ts, NULL);
                                                   ^^^^
when changing the ts to &ts the program runs correctly.

- Erwin
Comment 1 Luca Bruno 2010-08-06 08:44:58 UTC
Created attachment 167237 [details] [review]
Fix passing real non null struct arguments to vararg methods.

Fixes bug 625758.
Comment 2 Luca Bruno 2010-08-19 09:32:48 UTC
Created attachment 168274 [details] [review]
Fix passing real non null struct arguments to vararg methods.

Fixes bug 625758.


Updated to apply clean on git master.
Comment 3 Jürg Billeter 2010-08-20 07:27:52 UTC
commit b96ab91fa9e04e9f0eace71b78264b394b028842
Author: Jürg Billeter <j@bitron.ch>
Date:   Fri Aug 6 10:43:03 2010 +0200

    Fix passing real non null struct arguments to vararg methods
    
    Based on patch by Luca Bruno, fixes bug 625758.