Skip to content

Commit 637575a

Browse files
devdanzinclaude
andcommitted
OOM-0036: mirror the posted presentations-index comment in UPSTREAM_ISSUE.md
Posted a blast-radius / faces index on python/cpython#151818 (issuecomment-4879684365) so someone who hits one of the superficially- unrelated debug-assert presentations (validate_list GC-head, dict/tuple freelist corruption, immortal-check, ...) finds the issue instead of filing a duplicate. All faces funnel through the single _CALL_LIST_APPEND double-free; the comment points back to this catalog dir for per-face rr ledgers + repros. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent 7d770b3 commit 637575a

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

‎reports/OOM-0036-list-append-oom-double-free/UPSTREAM_ISSUE.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,35 @@ decref doesn't free it).
173173
`_CALL_LIST_APPEND` is the only append op using `ERROR_NO_POP`; `LIST_APPEND` / `SET_ADD` /
174174
`MAP_ADD` use the codegen-accounted `ERROR_IF`, which drops the consumed input. So the fix
175175
here is to account for the stolen `arg` on the error path (and could be folded into #151538).
176+
177+
---
178+
179+
# Presentations-index comment (posted on #151818, 2026-07-03)
180+
181+
Posted at https://github.com/python/cpython/issues/151818#issuecomment-4879684365 — a
182+
blast-radius / faces index so someone who hits one of the superficially-unrelated debug-assert
183+
presentations finds this issue instead of filing a duplicate.
184+
185+
**FYI — blast radius / presentations index.** fusil's OOM-injection fuzzing keeps surfacing this as superficially-unrelated crashes, but every one `rr`-reduces to this same `_CALL_LIST_APPEND` double-free (`_PyList_AppendTakeRefListResize`, `listobject.c:531`). Recording them here so the next person who hits one of these signatures finds *this* issue instead of filing a new one.
186+
187+
One producer, many **victim/detector sites** (depending on what the double-freed item was and what reused its freed slot) — on a debug build:
188+
189+
| Presentation (assert / crash) | victim |
190+
|---|---|
191+
| `_Py_NegativeRefcount` / `<object is freed>` | any item with a 2nd owner |
192+
| `DirEntry_dealloc` (`posixmodule.c`) segv / UAF | an `os.DirEntry.path` string |
193+
| `pycore_stackref.h:726 PyStackRef_XCLOSE` negref | the leftover stolen stackref itself |
194+
| `traceback.c:313 _PyTraceBack_FromFrame` assert | an object held via a traceback frame |
195+
| `pycore_object.h Py_DECREF_MORTAL` — `!_Py_IsStaticImmortal(op)` | freed block read back as static-immortal |
196+
| `dictobject.c:961 new_dict` — `mp == NULL \|\| Py_IS_TYPE(mp, &PyDict_Type)` | a dict that landed on the dict freelist |
197+
| `tupleobject.c:48 tuple_alloc` — `PyTuple_Check(op)` | a tuple on the tuple freelist |
198+
| `gc.c:380 validate_list` (at shutdown) | a `co_consts` constant whose freed slot a weakref's `PyGC_Head` reused |
199+
200+
And it's reachable from many ordinary stdlib operations under real memory pressure — `os.walk` / `os.scandir`, `pkgutil.get_importer` / the import machinery (importlib's `path.append`), `sys.path` mutation + `__import__` — not only a literal `list.append`. (Several of these arrived as separate reports that `rr` later folded into this one.)
201+
202+
Since they all funnel through the single `_CALL_LIST_APPEND` steal-then-`ERROR_NO_POP`, the fix here should cover every presentation above; flagging mainly because the freelist / GC-head faces don't look like a `list.append` bug at a glance.
203+
204+
Full triage, per-face `rr` ledgers, and reproducers for each presentation live in a sibling catalog of fusil's OOM findings — this bug is [`reports/OOM-0036-list-append-oom-double-free/`](https://github.com/devdanzin/cpython-oom-findings/tree/main/reports/OOM-0036-list-append-oom-double-free) (`report.md` + `meta.json`; per-face backtraces `backtrace_immortal.txt` / `backtrace_dict_freelist.txt` / `backtrace_validate_list.txt`; reproducers `repro.py`, `repro_natural.py` (real `RLIMIT_AS`, no test API), `repro_get_importer.py`).
205+
206+
---
207+
*Investigation and comment draft by Claude Code (Opus 4.8)*

0 commit comments

Comments
 (0)