Commit fbfb70a
committed
[analyzer] Disable graph-trim-interval by default
Because this hack is responsible for use-after-free errors that can
trigger assertion failures, as reported e.g. in the github issue
#105512
Disabling this performance optimization can cause severe slowdowns (up
to +200% runtime) on a few specific translation units, but its effects
are barely significant when they are averaged over a whole project: even
on projects that are "severely affected" the slowdowns are <20 seconds.
If someone happens to be heavily affected by this performance loss (and
doesn't fear the crashes) they can re-enable ExplodedNode reclamation by
passing -analyzer-option graph-trim-interval=1000 (the old default) to
the analyzer.
This commit is a temporary workaround to eliminate the crashes ASAP; in
addition to this, we're also working to develop a long-term solution
that can hopefully remove 'graph-trim-interval' altogether and replace
it with different solutions that guarantee a good runtime without
breaking the invariants of the ExplodedGraph. (It would be much easier
to reason about the execution paths if we didn't have to think about the
case that some nodes can just disappear.)1 parent 3645c64 commit fbfb70a
File tree
2 files changed
+6
-4
lines changed- clang
- include/clang/StaticAnalyzer/Core
- test/Analysis
2 files changed
+6
-4
lines changedLines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
397 | | - | |
398 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments