BUGFIX: Occurrence of multiple macro symbols in one tuple could lead to infinite loop.
The mechanism with the next pointers for tac's was working fine as long as all tac's were unique by construction. The macro mechanism made it possible for the same tac to occur twice in the tree. This could lead to an infinite loop. Now we make explicit copies of the top-level tac. This should fix the problem caused by the tuple parsing. A more fundamental solution is to make a deep copy of the substituted terms.
This commit is contained in:
@@ -423,7 +423,7 @@ basicormacro : ID
|
||||
Tac macrotac;
|
||||
|
||||
macrotac = (Tac) l->data;
|
||||
t = macrotac->t2.tac;
|
||||
t = tacCopy(macrotac->t2.tac);
|
||||
}
|
||||
$$ = t;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user