]> granicus.if.org Git - llvm/commit
[inlineasm] Fix crash when number of matched input constraint operands overflows...
authorDaniil Fukalov <daniil.fukalov@amd.com>
Wed, 25 Oct 2017 12:51:32 +0000 (12:51 +0000)
committerDaniil Fukalov <daniil.fukalov@amd.com>
Wed, 25 Oct 2017 12:51:32 +0000 (12:51 +0000)
commit65f1735a62f6ae1654f90380e08b1f154c54f7ce
tree33855fd7dc035c648e832536c0e0b376c5c4e0b4
parent14c20baca7c838683e1568cb693bcaf5041d571c
[inlineasm] Fix crash when number of matched input constraint operands overflows signed char

In a case when number of output constraint operands that has matched input operands
doesn't fit to signed char, TargetLowering::ParseConstraints() can try to access
ConstraintOperands (that is std::vector) with negative index.

Reviewers: rampitec, arsenm

Differential Review: https://reviews.llvm.org/D39125

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316574 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/InlineAsm.h
lib/IR/InlineAsm.cpp
test/CodeGen/AMDGPU/InlineAsmCrash.ll [new file with mode: 0644]