Skip to content

Commit 615a5eb

Browse files
authored
[clang][bytecode] Check ai32_bextr builtins for integer args (#113128)
1 parent df8b785 commit 615a5eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,10 @@ static bool interp__builtin_ia32_bextr(InterpState &S, CodePtr OpPC,
12531253
const InterpFrame *Frame,
12541254
const Function *Func,
12551255
const CallExpr *Call) {
1256+
if (!Call->getArg(0)->getType()->isIntegerType() ||
1257+
!Call->getArg(1)->getType()->isIntegerType())
1258+
return false;
1259+
12561260
PrimType ValT = *S.Ctx.classify(Call->getArg(0));
12571261
PrimType IndexT = *S.Ctx.classify(Call->getArg(1));
12581262
APSInt Val = peekToAPSInt(S.Stk, ValT,

0 commit comments

Comments
 (0)