Commit 7e1ff72
authored
Avoid overwriting minimized keys if minimization round fails. (#4626)
Previous logic would overwrite `minimized_keys` if say round 5 of
libfuzzer minimization failed, even if round 4 succeeded. This resulted
in tasks completing minimization successfully, but not storing
`minimized_keys` to reflect that in the database.
Instead, we should take the result of the last successful minimization
round. This both aligns with the logic around crash results and testcase
file names, and prevents another side effect of this bug: we were
previously deleting blobs on GCS that had been uploaded during
successful minimization rounds :/
Note: it seems a similar bug affects the cleanse step, but I did not
change logic there as it is OSS-Fuzz specific and I was not sure whether
or not it could be intentional. See [`minimize_task.py` line
1686](https://github.com/google/clusterfuzz/pull/4626/files#diff-e8255271eeeadc2bda46b215fbc7b0bb160ef1116f6e27ff895990d88caafa5fR1686).
There are exceedingly few tests for minimize task, so I did not write a
test for this either - the effort required seemed too high.
Bug: https://crbug.com/3895896791 parent 41e5571 commit 7e1ff72
File tree
2 files changed
+28
-18
lines changed- src/clusterfuzz/_internal/bot
- tasks/utasks
2 files changed
+28
-18
lines changedLines changed: 23 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1370 | 1370 | | |
1371 | 1371 | | |
1372 | 1372 | | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
| |||
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | | - | |
1433 | | - | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
1434 | 1442 | | |
1435 | 1443 | | |
1436 | 1444 | | |
| |||
1565 | 1573 | | |
1566 | 1574 | | |
1567 | 1575 | | |
1568 | | - | |
1569 | | - | |
1570 | 1576 | | |
1571 | 1577 | | |
1572 | 1578 | | |
| |||
1637 | 1643 | | |
1638 | 1644 | | |
1639 | 1645 | | |
1640 | | - | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
1641 | 1650 | | |
1642 | 1651 | | |
1643 | 1652 | | |
| |||
1653 | 1662 | | |
1654 | 1663 | | |
1655 | 1664 | | |
| 1665 | + | |
1656 | 1666 | | |
1657 | 1667 | | |
1658 | 1668 | | |
| |||
1663 | 1673 | | |
1664 | 1674 | | |
1665 | 1675 | | |
1666 | | - | |
1667 | | - | |
| 1676 | + | |
| 1677 | + | |
1668 | 1678 | | |
1669 | 1679 | | |
1670 | 1680 | | |
| |||
1673 | 1683 | | |
1674 | 1684 | | |
1675 | 1685 | | |
1676 | | - | |
| 1686 | + | |
1677 | 1687 | | |
1678 | 1688 | | |
1679 | 1689 | | |
| |||
1690 | 1700 | | |
1691 | 1701 | | |
1692 | 1702 | | |
1693 | | - | |
1694 | | - | |
| 1703 | + | |
| 1704 | + | |
1695 | 1705 | | |
1696 | 1706 | | |
1697 | 1707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
| 778 | + | |
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| |||
0 commit comments