Fix 11865: Assert failure in setSymbolic() (#5318)

This commit is contained in:
Paul Fultz II 2023-08-12 12:58:09 -05:00 committed by GitHub
parent 5c6962c273
commit 0901ba9a7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -5448,6 +5448,8 @@ static void valueFlowSymbolicOperators(const SymbolDatabase& symboldatabase, con
const Token* arg = tok->next()->astOperand2();
if (!arg)
continue;
if (arg->exprId() == 0)
continue;
ValueFlow::Value c = inferCondition(">=", arg, 0);
if (!c.isKnown())
continue;

View File

@ -7354,6 +7354,11 @@ private:
" }\n"
"}\n";
valueOfTok(code, "i");
code = "void f() {\n"
" if (llabs(0x80000000ffffffffL) == 0x7fffffff00000001L) {}\n"
"}\n";
valueOfTok(code, "f");
}
void valueFlowCrashConstructorInitialization() { // #9577