Repository navigation
Commit 396bb75
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 fdc1942 commit 396bb75
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2842 | 2842 | | |
2843 | 2843 | | |
2844 | 2844 | | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
2845 | 2848 | | |
2846 | 2849 | | |
2847 | 2850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
839 | 848 | | |
840 | 849 | | |
841 | 850 | | |
| |||
0 commit comments