Commit 25826c9
committed
Charles Waldman writes:
"""
Running "test_extcall" repeatedly results in memory leaks.
One of these can't be fixed (at least not easily!), it happens since
this code:
def saboteur(**kw):
kw['x'] = locals()
d = {}
saboteur(a=1, **d)
creates a circular reference - d['x']['d']==d
The others are due to some missing decrefs in ceval.c, fixed by the
patch attached below.
Note: I originally wrote this without the "goto", just adding the
missing decref's where needed. But I think the goto is justified in
keeping the executable code size of ceval as small as possible.
"""
[I think the circular reference is more like kw['x']['kw'] == kw. --GvR]1 parent 5ce78f8 commit 25826c9
1 file changed
Lines changed: 13 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
1626 | | - | |
1627 | | - | |
| 1626 | + | |
1628 | 1627 | | |
1629 | 1628 | | |
1630 | 1629 | | |
1631 | 1630 | | |
1632 | 1631 | | |
1633 | 1632 | | |
1634 | 1633 | | |
1635 | | - | |
1636 | | - | |
| 1634 | + | |
1637 | 1635 | | |
1638 | 1636 | | |
1639 | 1637 | | |
1640 | 1638 | | |
1641 | 1639 | | |
1642 | 1640 | | |
1643 | | - | |
1644 | | - | |
| 1641 | + | |
1645 | 1642 | | |
1646 | 1643 | | |
1647 | 1644 | | |
1648 | 1645 | | |
1649 | 1646 | | |
1650 | 1647 | | |
1651 | | - | |
1652 | | - | |
| 1648 | + | |
1653 | 1649 | | |
1654 | 1650 | | |
1655 | 1651 | | |
1656 | 1652 | | |
1657 | 1653 | | |
1658 | 1654 | | |
1659 | | - | |
1660 | | - | |
| 1655 | + | |
1661 | 1656 | | |
1662 | 1657 | | |
1663 | 1658 | | |
1664 | 1659 | | |
1665 | 1660 | | |
1666 | | - | |
1667 | | - | |
| 1661 | + | |
1668 | 1662 | | |
1669 | 1663 | | |
1670 | 1664 | | |
| |||
1680 | 1674 | | |
1681 | 1675 | | |
1682 | 1676 | | |
1683 | | - | |
| 1677 | + | |
1684 | 1678 | | |
1685 | 1679 | | |
1686 | 1680 | | |
| |||
1689 | 1683 | | |
1690 | 1684 | | |
1691 | 1685 | | |
1692 | | - | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1693 | 1691 | | |
1694 | 1692 | | |
1695 | 1693 | | |
| |||
2382 | 2380 | | |
2383 | 2381 | | |
2384 | 2382 | | |
| 2383 | + | |
2385 | 2384 | | |
2386 | 2385 | | |
2387 | 2386 | | |
| |||
0 commit comments