Repository navigation
Commit 7e562f0
valueFlowLifetime: subscripted array is not a decayed pointer
For 'arr[i]' where arr is an array of pointers, isDecayedPointer()
returned true because the type of 'arr[i]' is a pointer. A lifetime
value was then created and forwarded for each subscript; with many
'arr[N] = ...' statements in one function this is quadratic.
spice rop3.c: ValueFlow 352s => 28s.
In 10000 Debian packages (--check-level=exhaustive) this adds 11
warnings: 9 correct nullPointerOutOfMemory/nullPointerOutOfResources
and 2 false positives (uninitvar, arrayIndexOutOfBoundsCond).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent b60f304 commit 7e562f0
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2835 | 2835 | | |
2836 | 2836 | | |
2837 | 2837 | | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
2838 | 2841 | | |
2839 | 2842 | | |
2840 | 2843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
837 | 846 | | |
838 | 847 | | |
839 | 848 | | |
| |||
0 commit comments