You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix list contains reflected __eq__, update bugs.md
list_contains now tries the search value's __eq__ when the element's
__eq__ returns NotImplemented. This makes ALWAYS_EQ/NEVER_EQ sentinel
comparison patterns work correctly for list `in` operator.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: bugs.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,16 @@
101
101
**Root cause**: `dict_keys_equal` returned "not equal" for any non-string, non-numeric heap pointers. Tuple keys, frozenset keys, etc. all failed equality checks.
102
102
**Fix**: Add `.dke_try_richcompare` fallback that calls `tp_richcompare(PY_EQ)` + `obj_is_true` for non-string heap pointer keys.
103
103
104
+
### 21. assertRaises double-free on fn(*args) exception (opcodes_call.asm)
105
+
**Symptom**: `assertRaises(ValueError, bad)` crashes with double-free
106
+
**Root cause**: CALL_FUNCTION_EX freed cfex_temp_pending, then eval_exception_unwind freed it again
107
+
**Fix**: Clear cfex_temp_pending before the call, not after
108
+
109
+
### 22. list `in` operator doesn't call reflected __eq__ (list.asm)
110
+
**Symptom**: `ALWAYS_EQ in [1]` returns False
111
+
**Root cause**: list_contains only tried element's __eq__, not value's reflected __eq__
112
+
**Fix**: Added `.try_reflected` path in list_contains
113
+
104
114
### Known Bugs Not Yet Fixed
105
115
-`dict.update(x=1, y=2)` with kwargs segfaults (methods.asm)
106
116
-`repr(d.keys())` returns wrong value (dict view repr not implemented)
0 commit comments