Go to file
Kristof Umann b8ac93c73b [analyzer] PR43102: Fix an assertion and an out-of-bounds error for diagnostic location construction
Summary:
https://bugs.llvm.org/show_bug.cgi?id=43102

In today's edition of "Is this any better now that it isn't crashing?", I'd like to show you a very interesting test case with loop widening.

Looking at the included test case, it's immediately obvious that this is not only a false positive, but also a very bad bug report in general. We can see how the analyzer mistakenly invalidated `b`, instead of its pointee, resulting in it reporting a null pointer dereference error. Not only that, the point at which this change of value is noted at is at the loop, rather then at the method call.

It turns out that `FindLastStoreVisitor` works correctly, rather the supplied explodedgraph is faulty, because `BlockEdge` really is the `ProgramPoint` where this happens.
{F9855739}
So it's fair to say that this needs improving on multiple fronts. In any case, at least the crash is gone.

Full ExplodedGraph: {F9855743}

Reviewers: NoQ, xazax.hun, baloghadamsoftware, Charusso, dcoughlin, rnkovacs, TWeaver

Subscribers: JesperAntonsson, uabelho, Ka-Ka, bjope, whisperity, szepet, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, cfe-commits

Tags: #clang

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

llvm-svn: 372269
2019-09-18 22:24:26 +00:00
clang [analyzer] PR43102: Fix an assertion and an out-of-bounds error for diagnostic location construction 2019-09-18 22:24:26 +00:00
clang-tools-extra [clang-tidy] Fix a potential infinite loop in readability-isolate-declaration check. 2019-09-18 09:21:35 +00:00
compiler-rt tsan: allow the Go runtime to return multiple stack frames for a single PC 2019-09-18 09:18:04 +00:00
debuginfo-tests Make nrvo-string test more robust. 2019-06-27 20:38:37 +00:00
libc Add a director, along with README.txt and LICENSE.txt, for libc. 2019-09-16 21:39:08 +00:00
libclc Revert "Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC" 2019-08-05 17:23:23 +00:00
libcxx Revert "Revert "Implement std::condition_variable via pthread_cond_clockwait() where available"" 2019-09-18 18:13:32 +00:00
libcxxabi Update XFAIL list for new GCC versions 2019-09-13 18:43:29 +00:00
libunwind unwind: remove a could of extraneous `else` (NFC) 2019-09-18 16:15:56 +00:00
lld [lld][WebAssembly] Fix use after free of archive path 2019-09-18 21:51:03 +00:00
lldb Fir TestAPILog for gcc 2019-09-18 13:41:50 +00:00
llgo
llvm gn build: Merge r372267 2019-09-18 22:21:52 +00:00
openmp [OpenMP] Change initialization of __kmp_global 2019-09-04 17:47:37 +00:00
parallel-libs
polly [CodeGen] Handle outlining of CopyStmts. 2019-09-17 22:59:43 +00:00
pstl [pstl] Allow customizing whether per-TU insulation is provided 2019-08-13 12:49:00 +00:00
.arcconfig
.clang-format
.clang-tidy
.git-blame-ignore-revs Add LLDB reformatting to .git-blame-ignore-revs 2019-09-04 09:31:55 +00:00
.gitignore Add a newline at the end of the file 2019-09-04 06:33:46 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.