Repository navigation
Commit 7e5d9ba
committed
test: flush GraalPy's inline caches before judging collectability (#1963)
test_cache_is_per_class_and_collectable failed on GraalPy 25.4.4 in
sharded runs. The class is not freed late: GraalPy's attribute and call
nodes along the nested-type walk (cls.mro() among them) cache the classes
they have seen and hold them strongly until the node goes megamorphic, so
a class measured while a node still has room stays reachable however long
gc.collect is given. Unsharded runs passed because earlier tests had
already overflowed those caches.
On GraalPy only, when the first collection leaves the class alive, send
throwaway classes of the same shape through the walk and collect again.
A reinstated module-level WeakKeyDictionary pin still fails on both
interpreters. CPython runs the check unchanged.1 parent 861985e commit 7e5d9ba
1 file changed
Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
34 | 67 | | |
35 | 68 | | |
36 | 69 | | |
| |||
256 | 289 | | |
257 | 290 | | |
258 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
259 | 295 | | |
260 | 296 | | |
261 | 297 | | |
| |||
0 commit comments