|
111 | 111 | **Root cause**: list_contains only tried element's __eq__, not value's reflected __eq__ |
112 | 112 | **Fix**: Added `.try_reflected` path in list_contains |
113 | 113 |
|
| 114 | +### 23. range repr/str not implemented (iter.asm) |
| 115 | +**Symptom**: `str(range(1000))` returns SmallInt 0, crashing BINARY_SLICE |
| 116 | +**Root cause**: range_obj_type had `tp_repr = 0` and `tp_str = 0` |
| 117 | +**Fix**: Implement range_obj_repr producing "range(start, stop[, step])" format |
| 118 | + |
| 119 | +### 24. Recursive list repr crashes (repr.asm) |
| 120 | +**Symptom**: `a=[]; a.append(a); repr(a)` → infinite recursion → crash |
| 121 | +**Root cause**: No recursion detection in list_repr |
| 122 | +**Fix**: Add global repr_stack, check/push/pop around repr, return "[...]" on cycle |
| 123 | + |
| 124 | +### 25. except tuple matching broken (exception.asm) |
| 125 | +**Symptom**: `except (MemoryError, OverflowError)` never matches |
| 126 | +**Root cause**: exc_isinstance only handled single type arg, not tuples |
| 127 | +**Fix**: Check if type arg is tuple, iterate elements recursively |
| 128 | + |
| 129 | +### 26. list * maxsize OOM crash (list.asm) |
| 130 | +**Symptom**: `[0] * sys.maxsize` → fatal OOM instead of OverflowError |
| 131 | +**Root cause**: No overflow check before huge allocation in list_repeat |
| 132 | +**Fix**: Add `jo` (signed overflow) check + 256M item limit, raise OverflowError |
| 133 | + |
| 134 | +### 27. list() accepts keyword args (list.asm) |
| 135 | +**Symptom**: `list(sequence=[])` returns `[]` instead of TypeError |
| 136 | +**Root cause**: list_type_call didn't check kw_names_pending |
| 137 | +**Fix**: Check kw_names_pending, raise TypeError if set |
| 138 | + |
114 | 139 | ### Known Bugs Not Yet Fixed |
| 140 | +- GMP crash during test_constructors in full test suite (memory corruption in int_mul) |
115 | 141 | - `dict.update(x=1, y=2)` with kwargs segfaults (methods.asm) |
116 | 142 | - `repr(d.keys())` returns wrong value (dict view repr not implemented) |
117 | 143 | - `(1,1) in d.items()` fails (dict_items __contains__ not implemented) |
118 | 144 | - `tuple(t) is t` identity optimization not implemented |
119 | | -- `list.append()` no-args segfaults (method arg count validation missing) |
120 | | -- `assertRaises(fn)` double-free crash (exception handling memory issue) |
121 | 145 | - `issubclass(C, (C,))` always returns False (tuple arg not supported) |
122 | 146 | - `isinstance(1, 1)` doesn't raise TypeError (input validation missing) |
123 | 147 | - `issubclass(1, int)` segfaults (input validation missing) |
124 | 148 | - `func.__name__ = "x"` silently ignored (attribute set on functions not supported) |
| 149 | +- User-defined `__iter__` dunder not connected to tp_iter slot on heaptypes |
125 | 150 |
|
126 | 151 | ## New Infrastructure Added |
127 | 152 | - `list_copy()` - standalone shallow copy function |
|
0 commit comments