Commit 73841a9
Follow-ups to 854eeb0: funcptrs_win v3-span backfill + string-overload AOOR guard
Two extensions of the same bug family 854eeb0 addressed for span overloads:
1. funcptrs_win.cs v3-span ReadOnlySpan overload was missed in 854eeb0
(the other three provider variants got the guard there, and the
provider.tt template was already updated correctly). Re-sync
funcptrs_win.cs with the template.
2. raw.cs string overloads of sqlite3_prepare_v2/v3 still sliced the
returned span unconditionally. With 854eeb0 making the provider
return an empty span on error, the slice becomes sp_tail.Slice(0, -1)
and throws ArgumentOutOfRangeException. Guard the slice behind
sp_tail.Length > 0.
Adds two regression tests that deterministically fire the AOOR on
unpatched string-overload code by closing the db with manual_close_v2
and growing the heap into the bit-31-clear address range.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 854eeb0 commit 73841a9
3 files changed
Lines changed: 67 additions & 6 deletions
File tree
- src
- SQLitePCLRaw.core
- SQLitePCLRaw.provider.e_sqlite3/Generated
- common
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
| 833 | + | |
| 834 | + | |
834 | 835 | | |
835 | 836 | | |
836 | 837 | | |
| |||
874 | 875 | | |
875 | 876 | | |
876 | 877 | | |
877 | | - | |
| 878 | + | |
| 879 | + | |
878 | 880 | | |
879 | 881 | | |
880 | 882 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 307 | + | |
| 308 | + | |
310 | 309 | | |
311 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
436 | 494 | | |
437 | 495 | | |
438 | 496 | | |
| |||
0 commit comments