Commit 1c3352d
committed
Harden exports and matching determinism
- SQLite/CSV/HTML exports: format u64 addresses as zero-padded
hex strings to avoid signed-INTEGER overflow on kernel addresses;
escape HTML in names/match_type; defuse CSV formula injection;
narrow broad except clauses.
- FFI: wrap every extern "C" entry point in catch_unwind to prevent
panics unwinding across the C boundary.
- Matching: switch to FxHashMap/FxHashSet and a total_cmp-based
tie-breaker for deterministic results; skip auto-generated names
(sub_/FUN_/loc_/...) in name matching; pre-bucket structural
matching by BB count to cut O(n²) work on large binaries.
- Scoring: sanitize per-metric and aggregate scores (NaN→0,
clamp [0,1]); fix normalized_edit_distance for two empty strings.
- types.rs: add #[serde(default)] + Default derives so older JSON
exports deserialize cleanly.
- database.rs: rename export_to_sqlite → export_to_sql_script
(writes a .sql script, not a .db).1 parent 5d18aa3 commit 1c3352d
8 files changed
Lines changed: 306 additions & 174 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
1434 | 1435 | | |
1435 | 1436 | | |
1436 | 1437 | | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1437 | 1450 | | |
1438 | 1451 | | |
1439 | 1452 | | |
| |||
1451 | 1464 | | |
1452 | 1465 | | |
1453 | 1466 | | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
1458 | 1471 | | |
1459 | 1472 | | |
1460 | | - | |
| 1473 | + | |
1461 | 1474 | | |
1462 | 1475 | | |
1463 | 1476 | | |
| |||
1468 | 1481 | | |
1469 | 1482 | | |
1470 | 1483 | | |
1471 | | - | |
| 1484 | + | |
1472 | 1485 | | |
1473 | 1486 | | |
1474 | 1487 | | |
| |||
1540 | 1553 | | |
1541 | 1554 | | |
1542 | 1555 | | |
1543 | | - | |
| 1556 | + | |
1544 | 1557 | | |
1545 | 1558 | | |
1546 | 1559 | | |
| |||
1565 | 1578 | | |
1566 | 1579 | | |
1567 | 1580 | | |
1568 | | - | |
| 1581 | + | |
1569 | 1582 | | |
1570 | 1583 | | |
1571 | 1584 | | |
| |||
1581 | 1594 | | |
1582 | 1595 | | |
1583 | 1596 | | |
1584 | | - | |
| 1597 | + | |
1585 | 1598 | | |
1586 | 1599 | | |
1587 | 1600 | | |
| |||
1668 | 1681 | | |
1669 | 1682 | | |
1670 | 1683 | | |
1671 | | - | |
| 1684 | + | |
1672 | 1685 | | |
1673 | 1686 | | |
1674 | 1687 | | |
| |||
1699 | 1712 | | |
1700 | 1713 | | |
1701 | 1714 | | |
1702 | | - | |
1703 | | - | |
| 1715 | + | |
| 1716 | + | |
1704 | 1717 | | |
1705 | 1718 | | |
1706 | 1719 | | |
| |||
1724 | 1737 | | |
1725 | 1738 | | |
1726 | 1739 | | |
1727 | | - | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
1728 | 1747 | | |
1729 | 1748 | | |
1730 | 1749 | | |
| |||
1737 | 1756 | | |
1738 | 1757 | | |
1739 | 1758 | | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
1751 | | - | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
1752 | 1771 | | |
1753 | 1772 | | |
1754 | 1773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
227 | | - | |
| 235 | + | |
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
0 commit comments