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 777242 - Double free regression
Double free regression
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.35.x
Other All
: Normal critical
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-14 01:43 UTC by Ole André Vadla Ravnås
Modified: 2017-01-16 19:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add testcase (1.23 KB, patch)
2017-01-15 18:28 UTC, Ole André Vadla Ravnås
none Details | Review

Description Ole André Vadla Ravnås 2017-01-14 01:43:46 UTC
Introduced by:
5b024e44077b6738855b6b2e92d913b75fda3444

The g_free() wrapper is not about NULL-checking, it's about clearing
the pointer to NULL after g_free().
Comment 1 Rico Tzschichholz 2017-01-14 12:29:27 UTC
Could you provide a small test-case?
Comment 2 Ole André Vadla Ravnås 2017-01-15 18:28:27 UTC
Created attachment 343508 [details] [review]
Add testcase

Rico: Hope this helps. It's probably also possible to reproduce this without involving async, but I'm not yet familiar enough with the compiler to come up with something simpler.
Comment 3 Rico Tzschichholz 2017-01-16 19:42:30 UTC
commit bbff74e9d9d7c44d95504af1b9b0369d63752cea
Author: Ole André Vadla Ravnås <oleavr@gmail.com>
Date:   Sun Jan 15 19:28:00 2017 +0100

    tests: Add testcase for double-free regression
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777242

commit 0d3ed86477736bdf12ef32c69fc5050b18a0d1ed
Author: Rico Tzschichholz <ricotz@ubuntu.com>
Date:   Mon Jan 16 15:52:41 2017 +0100

    Revert "codegen: g_free is already NULL-safe"
    
    This reverts commit 5b024e44077b6738855b6b2e92d913b75fda3444.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777242