crash fixes for constructs that expect add/delete expressions to return values

This commit is contained in:
Vern Paxson 2025-07-10 11:23:50 -07:00 committed by Evan Typanski
parent c6011e2160
commit fe5c953d31
4 changed files with 22 additions and 5 deletions

View file

@ -730,9 +730,10 @@ ExprPtr AddExpr::BuildSub(const ExprPtr& op1, const ExprPtr& op2) {
}
ExprPtr AggrAddDelExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
if ( type )
return UnaryExpr::Reduce(c, red_stmt);
// In the future, if we use add/delete for list operations or such,
// then the following becomes germane.
// if ( type )
// return UnaryExpr::Reduce(c, red_stmt);
if ( c->Optimizing() )
op = c->UpdateExpr(op);