[vala] Fix subtle bug in flowanalyzer that made the compiler crash
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fix subtle bug in flowanalyzer that made the compiler crash
- Date: Wed, 2 Oct 2013 20:13:31 +0000 (UTC)
commit e3cccfb75832fae388bcf773c7b75561dac91b68
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Oct 2 22:11:46 2013 +0200
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 .
vala/valaflowanalyzer.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaflowanalyzer.vala b/vala/valaflowanalyzer.vala
index 4528337..62dc58a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]