Skip to content

Commit 1fd79f1

Browse files
authored
[clang][bytecode] Check number of addcarry/subborrow args (#111952)
Apparently this can fail as well.
1 parent 25cda9e commit 1fd79f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ static bool interp__builtin_ia32_addcarry_subborrow(InterpState &S,
12871287
const InterpFrame *Frame,
12881288
const Function *Func,
12891289
const CallExpr *Call) {
1290-
if (!Call->getArg(0)->getType()->isIntegerType() ||
1290+
if (Call->getNumArgs() != 4 || !Call->getArg(0)->getType()->isIntegerType() ||
12911291
!Call->getArg(1)->getType()->isIntegerType() ||
12921292
!Call->getArg(2)->getType()->isIntegerType())
12931293
return false;

0 commit comments

Comments
 (0)