mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
fixes for ZAM's propagation of control flow information for some degenerate constructs
This commit is contained in:
parent
a3a0155825
commit
148215aa87
6 changed files with 72 additions and 3 deletions
|
@ -1020,8 +1020,11 @@ void ZAMCompiler::BackPropagateCFT(int inst_num, ControlFlowType cf_type) {
|
|||
if ( insts1[j]->live )
|
||||
break;
|
||||
|
||||
// We should never wind up killing an instruction that has no predecessor.
|
||||
ASSERT(j >= 0);
|
||||
// Initializations of unused variables in functions with no arguments can
|
||||
// come at the very beginning of the function, in which case there will
|
||||
// be no predecessor to back-propagate to.
|
||||
if ( j < 0 )
|
||||
return;
|
||||
|
||||
// Make sure the CFT entry is created.
|
||||
AddCFT(insts1[j], cf_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue