Commit 5225abe
oom_dedup: parse GCC-build ASan frames; skip free-plumbing
A batch of 186 crashes from a GCC-built free-threaded ASan interpreter was all
labelled oomNEW, but every one is OOM-0004 (the PyList_New error-path list
double-free). Two GCC-vs-Clang differences defeated the in-loop dedup:
1. ASan source paths. Clang emits an absolute path + column
(/abs/Objects/listobject.c:68:9); GCC emits a relative path and no column
(Objects/listobject.c:68). _ASAN_FRAME required the leading "/", so on GCC
builds extract_native_sites matched nothing and the dedup fell back to
faulthandler's C-stack -- which GCC inlines down to _Py_MergeZeroLocalRefcount
(object.c:444), not a catalog site -> oomNEW. Make the absolute prefix and the
column optional.
2. Free plumbing. Even once the rich ASan frames parse, the innermost frames are
the _testcapi set_nomemory injection hook (hook_ffree) and the PyMem_Free
wrapper, which sit between the (already-skipped) debug-allocator checks and the
real caller. Add hook_f{malloc,calloc,realloc,free} and the
PyMem_/PyObject_ free/realloc wrappers to _BT_SKIP so the resolved site
descends to the real caller (free_list_items = OOM-0004), same rationale as the
existing _PyMem_Debug* detector skips.
With both fixes the batch resolves 184/186 -> OOM-0004 in-loop (the other 2 have
unsymbolized ASan traces -> oomSEGV, correctly kept for gdb rather than flagged
new). Adds a regression test for the GCC relative-path frame format.
Suite green (309 tests).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent d809f56 commit 5225abe
2 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
158 | 163 | | |
159 | | - | |
160 | | - | |
| 164 | + | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
176 | 189 | | |
177 | 190 | | |
178 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
275 | 291 | | |
276 | 292 | | |
277 | 293 | | |
| |||
0 commit comments