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 782056 - ZLib binding broken since vala 0.36
ZLib binding broken since vala 0.36
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.36.x
Other Linux
: Normal major
: ---
Assigned To: Vala maintainers
Vala maintainers
: 782979 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-05-02 10:59 UTC by Jan Alexander Steffens (heftig)
Modified: 2017-05-23 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revert "codegen: Don't implicitly initialize local variables with an initializer" (1.65 KB, patch)
2017-05-02 12:26 UTC, Rico Tzschichholz
committed Details | Review

Description Jan Alexander Steffens (heftig) 2017-05-02 10:59:21 UTC
Creating a new stream using ZLib.DeflateStream(compressionlevel) now causes frequent crashes. vala 0.34 used to zero-initialize the z_stream before passing it to deflateInit. vala 0.36 leaves it uninitialized.

void main () {
  var stream = ZLib.DeflateStream (ZLib.Level.BEST_COMPRESSION);
}

vala 0.36 (valac --pkg zlib -C) produces:

void _vala_main (void) {
	z_stream stream;
	deflateInit (&stream, (gint) Z_BEST_COMPRESSION);
	deflateEnd (&stream);
}

vala 0.34 used to write "z_stream stream = {0};".
Comment 1 Rico Tzschichholz 2017-05-02 12:26:51 UTC
Created attachment 350867 [details] [review]
Revert "codegen: Don't implicitly initialize local variables with an initializer"

This reverts commit f5c654f76eeb1ee887f3d89eb701cf82f75a430a.
Comment 2 Rico Tzschichholz 2017-05-03 09:50:29 UTC
commit 10c668de04c6e44a9919d6ca5a4976e81d9bbc32
Author: Rico Tzschichholz <ricotz@ubuntu.com>
Date:   Tue May 2 14:09:41 2017 +0200

    Revert "codegen: Don't implicitly initialize local variables with an initializer"
    
    This reverts commit f5c654f76eeb1ee887f3d89eb701cf82f75a430a.
Comment 3 Ondrej Holy 2017-05-23 11:02:08 UTC
*** Bug 782979 has been marked as a duplicate of this bug. ***