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 593137 - Use of generics in constructor should not refer to self->priv variables
Use of generics in constructor should not refer to self->priv variables
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator: GType
0.7.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-26 10:25 UTC by Didier "Ptitjes"
Modified: 2009-08-27 08:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix use of generics in base expressions inside constructors (2.26 KB, patch)
2009-08-26 10:29 UTC, Didier "Ptitjes"
none Details | Review

Description Didier "Ptitjes" 2009-08-26 10:25:09 UTC
Use of generics in base expressions in creation methods such as the following with resolve to a segfault because the self->priv variables are not yet initialized.

public class MyGenericClass<G> : MyOtherClass {
    public MyGenericClass () {
        base (typeof (G));
    }
}
Comment 1 Didier "Ptitjes" 2009-08-26 10:29:12 UTC
Created attachment 141732 [details] [review]
Fix use of generics in base expressions inside constructors
Comment 2 Jürg Billeter 2009-08-27 08:36:46 UTC
commit d234cb597bcd1e0e8232b15d0099c6479ca3ae11
Author: Didier 'Ptitjes <ptitjes@free.fr>
Date:   Wed Aug 26 12:26:12 2009 +0200

    Fix use of generics in base expressions inside constructors
    
    Fixes bug 593137.