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 587947 - SIGSEGV when compiling public static const with object constructor calls
SIGSEGV when compiling public static const with object constructor calls
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: general
0.7.x
Other All
: Normal critical
: ---
Assigned To: Jürg Billeter
Vala maintainers
: 575628 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-07 07:29 UTC by Michael Trausch
Modified: 2009-09-17 15:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
valac binary (78.42 KB, application/octet-stream)
2009-07-07 07:29 UTC, Michael Trausch
Details

Description Michael Trausch 2009-07-07 07:29:04 UTC
Please describe the problem:
I have a file that defines public static const variables which are instances  
of objects, so they look like:

    public static const IpAddress ipv4_broadcast =
      new IpAddress.from_string("255.255.255.255");

My guess is that they're not supported that way, but the compiler catches a   
SIGSEGV when compiling the code.  If I remove all of the assignments that are
similar to that, the compiler no longer crashes.

The source for the file itself is available at:

 http://bazaar.launchpad.net/~mtrausch/%2Bjunk/libfastcgi-vala/annotate/head%3A/src/utils/IpAd$

Short URL to the same resource, in case the link breaks:

 http://is.gd/1pGkR

I had to run vala in a debugger to produce the SIGSEGV.  Not entirely sure    
about why the problem happened that way, though.              


Steps to reproduce:
Fetch the project sources: bzr branch lp:~mtrausch/+junk/fastcgi-vala
Configure (autogen.sh) and try to build the sources.

Actual results:
SIGSEGV

Expected results:
Error and graceful exit

Does this happen every time?
yes

Other information:
Will attach the vala binary and a core file from that binary from my x86-64 system so more post-mortem can be done.  Problem is 100% reproducible with vala git master, so if core/executable in different format is needed, simply replicate the conditions as per above.
Comment 1 Michael Trausch 2009-07-07 07:29:43 UTC
Created attachment 137952 [details]
valac binary
Comment 2 Michael Trausch 2009-07-07 07:35:39 UTC
Core dump is at http://mike.trausch.us/core.xz - the size (1.4M) was rejected by Bugzilla.
Comment 3 Jürg Billeter 2009-07-10 11:44:51 UTC
commit 3b3ffa129f449b5d238c0d32476ea8eef41a6e8d
Author: Jürg Billeter <j@bitron.ch>
Date:   Fri Jul 10 12:39:17 2009 +0100

    Check type of constants
    
    Fixes bug 587947.
Comment 4 Jürg Billeter 2009-09-17 15:40:25 UTC
*** Bug 575628 has been marked as a duplicate of this bug. ***