r251289 - [analyzer] Fixed a rare crash when analyzing lambda functions.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 26 09:45:45 PDT 2015


On Mon, Oct 26, 2015 at 6:32 AM, Gabor Horvath via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: xazax
> Date: Mon Oct 26 08:32:26 2015
> New Revision: 251289
>
> URL: http://llvm.org/viewvc/llvm-project?rev=251289&view=rev
> Log:
> [analyzer] Fixed a rare crash when analyzing lambda functions.
>

Test case?


>
> Modified:
>     cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
>
> Modified: cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp?rev=251289&r1=251288&r2=251289&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp (original)
> +++ cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp Mon Oct 26 08:32:26
> 2015
> @@ -1022,7 +1022,7 @@ MemRegionManager::getCXXThisRegion(QualT
>    // 'this' refers to a this to the enclosing scope, there is no right
> region to
>    // return.
>    while (!LC->inTopFrame() &&
> -         PT != D->getThisType(getContext())->getAs<PointerType>()) {
> +         (!D || PT !=
> D->getThisType(getContext())->getAs<PointerType>())) {
>      LC = LC->getParent();
>      D = dyn_cast<CXXMethodDecl>(LC->getDecl());
>    }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151026/dfdec163/attachment.html>


More information about the cfe-commits mailing list