]> granicus.if.org Git - llvm/commit
[BlockExtractor] Avoid assert with wrong line format
authorJinsong Ji <jji@us.ibm.com>
Tue, 20 Aug 2019 14:46:02 +0000 (14:46 +0000)
committerJinsong Ji <jji@us.ibm.com>
Tue, 20 Aug 2019 14:46:02 +0000 (14:46 +0000)
commitb3d478a4bc61638d51ba3bb53d68d529ff69ed9e
treedf7cdf5d09e7cc02e36fdffda271432d94e20539
parent4b2842da080a39c3c89ebb83bc46493a968031d2
[BlockExtractor] Avoid assert with wrong line format

Summary:
When the line format is wrong, we may end up accessing out of bound
memory. eg: the test with invalide line will cause assert.
Assertion `idx < size()' failed

The fix is to report fatal when we found mismatched line format.

Reviewers: qcolombet, volkan

Reviewed By: qcolombet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66444

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369389 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/BlockExtractor.cpp
test/Transforms/BlockExtractor/invalid-line.ll [new file with mode: 0644]