Repository navigation
Commit bd9d844
committed
Keep FDICT zlib headers out of the invalid-input test and pin them
Fuzzing the zlib tests with Atheris produced a zlib header with the
FDICT flag set within seconds, and zlib._ZlibDecompressor turns that
into SystemError ("error return without exception set") because the
Z_NEED_DICT branch returns NULL without an exception. That is the same
defect as gh-160001, reached without any dictionary at all. Random
invalid input hits it often enough to make test_invalid_input flaky for
the zlib wrapper backend, and in a debug build the missing exception is
a fatal C assertion rather than a failure.
The invalid-input check now asks the class whether to skip a blob, and
the zlib wrapper companion skips valid headers with FDICT set. The
carve-out is pinned by test_fdict_header, which expects zlib.error as
zlib.decompressobj raises for the same input, and which like
test_zlib_wrapper can only run in a release build.1 parent e03f55a commit bd9d844
1 file changed
Lines changed: 43 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
454 | 463 | | |
455 | 464 | | |
456 | 465 | | |
457 | 466 | | |
458 | 467 | | |
459 | 468 | | |
460 | 469 | | |
| 470 | + | |
| 471 | + | |
461 | 472 | | |
462 | 473 | | |
463 | 474 | | |
| |||
519 | 530 | | |
520 | 531 | | |
521 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
522 | 563 | | |
523 | 564 | | |
524 | 565 | | |
| |||
608 | 649 | | |
609 | 650 | | |
610 | 651 | | |
611 | | - | |
612 | | - | |
| 652 | + | |
| 653 | + | |
613 | 654 | | |
614 | 655 | | |
615 | 656 | | |
| |||
0 commit comments