Repository navigation
Commit d297c1e
committed
(Correctness) Bound the SIFT exponential-table lookup
## Summary
Prevent an out-of-bounds read when a valid CPU SIFT descriptor reaches the
last exponential-table entry. Add a regression test for that endpoint.
## Validation
Incremental over 755248a; upstream pin
fa08906.
- Actual-source address and undefined-behavior sanitizer checks reproduce
the original read at index 257, both directly and through a descriptor;
both paths pass with the fix.
- CPU SIFT tests pass 20/20 on the parent and 21/21 with the fix. Ordinary
and sanitized differential fixtures each match 11,620 float descriptors.
- The test source passes clang-format 23.1.3. The native executable relinks.
The fix retains the existing interpolation and the behavior above the table
range. Performance, complete reconstruction output and table-initialization
thread safety were not measured by these checks.
AI disclosure: Totally vibe coded.1 parent 755248a commit d297c1e
2 files changed
Lines changed: 42 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
206 | 246 | | |
207 | 247 | | |
208 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
704 | | - | |
| 704 | + | |
| 705 | + | |
705 | 706 | | |
706 | 707 | | |
707 | 708 | | |
| |||
0 commit comments