]> granicus.if.org Git - clang/commit
CodeGenAction::ExecuteAction(): check for invalid LLVM source locations
authorAlp Toker <alp@nuanti.com>
Mon, 30 Jun 2014 01:33:59 +0000 (01:33 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 30 Jun 2014 01:33:59 +0000 (01:33 +0000)
commit19ef24a38bfbbc9ef61ad6cb7cc73f7773251d73
tree2592c9cf9fa262e11c8a14f8c8aae72bf9a75831
parent9ec95c85e71e9c9360c9e3fd8c984432bbbec1f5
CodeGenAction::ExecuteAction(): check for invalid LLVM source locations

Add sign checks to deal with the fact that IR parser line/column pairs are
signed integers and sometimes invalid.

The crash path is potentially triggered by corrupt '.bc' files in practice,
though I don't have a binary input test case that can be checked-in right now.

(Unfortunately the backend itself crashes on various ill-formed '.bc' inputs so
this bandage isn't as helpful as it appears yet.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212007 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenAction.cpp