Bug hunting; Avoid bailout uninit FP, arrays

This commit is contained in:
Daniel Marjamäki 2020-07-19 16:27:56 +02:00
parent 5df9cd90a6
commit fe0081496c
1 changed files with 4 additions and 0 deletions

View File

@ -296,6 +296,10 @@ static void uninit(const Token *tok, const ExprEngine::Value &value, ExprEngine:
if (var && Token::Match(var->nameToken(), "%varid% ;| %varid%| =", tok->varId())) if (var && Token::Match(var->nameToken(), "%varid% ;| %varid%| =", tok->varId()))
return; return;
// Arrays are allocated on the stack
if (var && Token::Match(tok, "%var% [") && var->isArray())
return;
if (tok->variable() && isVariableAssigned(tok->variable(), tok)) if (tok->variable() && isVariableAssigned(tok->variable(), tok))
return; return;
} }