[cfe-commits] PATCH: Fix dereference of end iterator
Matt Beaumont-Gay
matthewbg at google.com
Wed Mar 14 13:28:31 PDT 2012
Thanks, r152738.
On Wed, Mar 14, 2012 at 13:23, Chandler Carruth <chandlerc at google.com> wrote:
> LGTM, please commit.
>
> On Wed, Mar 14, 2012 at 11:39 AM, Matt Beaumont-Gay <matthewbg at google.com>
> wrote:
>>
>> Spotted by ASan via test/Analysis/func.c.
>>
>> --- a/lib/Analysis/CallGraph.cpp 2012-03-13 16:21:39.000000000
>> -0700
>> +++ b/lib/Analysis/CallGraph.cpp 2012-03-14 11:26:25.000000000
>> -0700
>> @@ -133,7 +133,9 @@
>> }
>>
>> CallGraphNode *CallGraph::getNode(const Decl *F) const {
>> - return FunctionMap.find(F)->second;
>> + FunctionMapTy::const_iterator I = FunctionMap.find(F);
>> + if (I == FunctionMap.end()) return 0;
>> + return I->second;
>> }
>>
>> CallGraphNode *CallGraph::getOrInsertFunction(Decl *F) {
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
More information about the cfe-commits
mailing list