Index: www/analyzer/open_projects.html =================================================================== --- www/analyzer/open_projects.html +++ www/analyzer/open_projects.html @@ -25,13 +25,94 @@
+ (Difficulty: Hard)
+Aggregates are object that can be brace-initialized without calling a
+ constructor (i.e., no
+ CXXConstructExpr
in the AST), but potentially calling
+ constructors for their fields and (since C++17) base classes - and these
+ constructors of sub-objects need to know what object (field in the
+ aggregate) they are constructing. Moreover, if the aggregate contains
+ references, lifetime extension needs to be modeled. Aggregates can be
+ nested, so
+ ConstructionContext
can potentially cover an unlimited amount of
+ statements. One can start untangling this problem by trying to replace the
+ hacky
+ ParentMap
lookup in
+ CXXConstructExpr::CK_NonVirtualBase
branch of
+ ExprEngine::VisitCXXConstructExpr()
with some actual
+ support for the feature.
+ (Difficulty: Medium)
?:
.
+ CFG for GNU "binary conditional" operator ?:
is broken in
+ C++. Its condition-and-LHS need to only be evaluated once.
+ (Difficulty: Easy)
+
Currently in the analyzer, the value of a union is always regarded as + unknown. There has been some discussion about this on the + mailing list already, but it is still an untouched area. + (Difficulty: Medium)
+There is a huge amount of checker work for teaching the Static Analyzer
+ about the C++ standard library. It is very easy to explain to the static
+ analyzer that calling .length()
on an empty std::string
+
will yield 0, and vice versa, but supporting all of them is a huge
+ amount of work. One good thing to start with here would be to notice that
+ inlining methods of C++ "containers" is currently outright forbidden in
+ order to suppress a lot of false alarms due to weird assume()
s
+ made within inlined methods. There's a hypothesis that these suppressions
+ should have been instead implemented as bug report visitors, which would
+ still suppress false positives, but will not prevent us from inlining the
+ methods, and therefore will not cause other false positives. Verifying this
+ hypothesis would be a wonderful accomplishment. Previous understanding of
+ the "inlined defensive checks" problem is a pre-requisite for this project.
+ (Difficulty: Medium)
+
+ LocAsInteger
is annoying, but alternatives are vague. Casts into
+ the opposite direction - integers to pointers - are completely unsupported.
+ Pointer-to-pointer casts are a mess; modeling them with
+ ElementRegion
is a impractical, and we are suffering a lot from
+ this hack, but coming up with a significantly better solution is very hard,
+ as there are a lot of corner-cases to cover, and it's hard to maintain
+ balance between richness of our representation of symbolic values and our
+ ability to understand when the two different values in fact represent the
+ same thing.
+ (Difficulty: Hard)
+
Sometimes instead of inlining, a much simpler behavior would be more + efficient. For instance, if the function is pure, then a single bit of + information "this function is pure" would already be much better than + conservative evaluation, and sometimes good enough to make inlining not + worth the effort. Gathering such snippets of information - "partial + summaries" - automatically, from the more simple to the more complex + summaries, and re-using them later, probably across translation units, might + improve our analysis quite a lot, while being something that can be worked + on incrementally and doesn't require checkers to react immediately. + (Difficulty: Hard)
+
BodyFarm allows the analyzer to explicitly model functions whose definitions are not available during analysis. Modeling more of the widely used functions (such as the members of std::string) will improve precision of the analysis. - (Difficulty: Easy, ongoing)
+ (Difficulty: Easy)
There is an existing implementation of this, but it's not complete and - is disabled in the analyzer. - (Difficulty: Medium; current contact: Alex McCarthy)
-Currently exceptions are treated as "black holes", and exception-handling control structures are poorly modeled (to be conservative). This could be much improved for both C++ and Objective-C exceptions. (Difficulty: Medium)
- -new
more precisely.
- The current representation of new
does not provide an easy
- way for the analyzer to model the call to a memory allocation function
- (operator new
), then initialize the result with a constructor
- call. The problem is discussed at length in
- PR12014.
- (Difficulty: Easy; current contact: Karthik Bhat)
delete
more precisely.
Similarly, the representation of delete
does not include
@@ -78,7 +147,8 @@
function (operator delete
). One particular issue
(noreturn destructors) is discussed in
PR15599
- (Difficulty: Easy; current contact: Karthik Bhat)
Constraints on the bits of an integer are not easily representable as @@ -92,7 +162,8 @@ dynamic type based on what operations the code is performing. Casts are a rich source of type information that the analyzer currently ignores. They are tricky to get right, but might have very useful consequences. - (Difficulty: Medium)
+ (Difficulty: Medium) +Implement unifying two symbolic values along a path after they are @@ -101,7 +172,35 @@ analyses, such as summary-based interprocedural and cross-translation-unit analysis. (Difficulty: Hard)
-
+ Environment
immutable
+ Values in the
+ Environment
should never change. Once value of an expression is
+ computed, it remains the same until the expression goes out of scope, so the
+ operation of substituting a value in
+ Environment
should have never been supported. Unfortunately,
+ adding such assertion crashes an awful lot of tests, because
+ Environment
is used for a lot of weird hacks even while modeling
+ simple operations like +=
.
+ (Difficulty: Medium)
+ Loc
values, other prvalue expressions have
+ NonLoc
values.
+ (Difficulty: Medium)
+
+ trackExpressionValue
.
+ The process of tracking values is very unclear. One should understand the + basic simple idea behind the solution and then throw away the existing code + and implement the clean solution. + (Difficulty: Medium)
+Because LLVM doesn't have branches, unfinished checkers first land in + alpha, and are only moved out once they are production-ready. However, over + the years many checkers got stuck in alpha, and their development have + stalled. +
Checkers that presumably can't be made to work should be removed from the + trunk and the rest should ideally be finished. +
alpha.security.ArrayBound
and
+ alpha.security.ArrayBoundV2
+ Array bounds checker is a very wanted feature, but it doesn't sound like + we can fix all of its false positives without full-featured loop widening + support. At the same time, array bound violations based on tainted + index values sound like a much more possible task. + (Difficulty: Medium)
+alpha.cplusplus.MisusedMovedObject
+ Something needs to be done about false positives caused by classes that + can in fact be used after being moved from, i.e. the empty space that + remains after the move has well-defined contents. This is not the case for + STL objects, but this is the case for many other user-defined objects. + (Difficulty: Easy)
+alpha.unix.Stream
+ One of the more annoying parts in this is handling state splits for error + return values. A "Schrödinger state" technique that was first implemented in + the PthreadLockChecker (where a mutex was destroyed and not destroyed at the + same time, until the return value of pthread_mutex_destroy was checked by a + branch in the code) is a possible solution. + (Difficulty: Easy)
+Path-sensitive lint checks are interesting and they can't be implemented + in clang-tidy and there's clearly an interest in them, but we here aren't + having enough maintenance power to respond to bugs and false positives. If + anybody with a maintainer attitude grabs takes responsibility of this part, + it may have a much better chance to grow and thrive. + (Difficulty: Easy)
+Symbolic expressions of the form $sym & CONSTANT
can range from 0 to CONSTANT-
1 if CONSTANT is 2^n-1
, e.g. 0xFF (0b11111111), 0x7F (0b01111111), 0x3 (0b0011), 0xFFFF, etc. Even without handling general bitwise operations on symbols, we can at least bound the value of the resulting expression. Bonus points for handling masks followed by shifts, e.g. ($sym & 0b1100) >> 2
.
+
Symbolic expressions of the form $sym & CONSTANT
can
+ range from 0 to CONSTANT-
1 if CONSTANT is 2^n-1
,
+ e.g. 0xFF (0b11111111), 0x7F (0b01111111), 0x3 (0b0011), 0xFFFF, etc. Even
+ without handling general bitwise operations on symbols, we can at least
+ bound the value of the resulting expression. Bonus points for handling masks
+ followed by shifts, e.g. ($sym & 0b1100) >> 2
.
(Difficulty: Easy)
(Difficulty: Easy)
-Take a look at the - CP-Miner - paper for inspiration. - (Difficulty: Medium-Hard; current contacts: Daniel Marjamäki and Daniel Fahlgren)
-