From: Luca Bruno Date: Wed, 2 Oct 2013 20:11:46 +0000 (+0200) Subject: Fix subtle bug in flowanalyzer that made the compiler crash X-Git-Tag: 0.22.1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3cccfb75832fae388bcf773c7b75561dac91b68;p=thirdparty%2Fvala.git Fix subtle bug in flowanalyzer that made the compiler crash By not copying the datatype the parent_node was overwritten. The bug was reproducible only with G_SLICE=always-malloc . --- diff --git a/vala/valaflowanalyzer.vala b/vala/valaflowanalyzer.vala index 45283377d..62dc58a73 100644 --- a/vala/valaflowanalyzer.vala +++ b/vala/valaflowanalyzer.vala @@ -514,10 +514,10 @@ public class Vala.FlowAnalyzer : CodeVisitor { } Variable versioned_var; if (var_symbol is LocalVariable) { - versioned_var = new LocalVariable (var_symbol.variable_type, var_symbol.name, null, var_symbol.source_reference); + versioned_var = new LocalVariable (var_symbol.variable_type.copy (), var_symbol.name, null, var_symbol.source_reference); } else { // parameter - versioned_var = new Parameter (var_symbol.name, var_symbol.variable_type, var_symbol.source_reference); + versioned_var = new Parameter (var_symbol.name, var_symbol.variable_type.copy (), var_symbol.source_reference); } variable_stack.add (versioned_var); return versioned_var;