python / python/cpython

Update `Lib/test/crashers`

未关闭
#121,921 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

tests
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

The Lib/test/crashers directory contains some Python files that are known to crash the interpreters. I thought it'd be useful to check in on whether they are still crashing the interpreter.

Here's what I get on a current-ish 3.14 build:

  • bogus_code_obj.py: TypeError because we're missing some arguments to the CodeType constructor. I assume this would still crash if you pass the missing args though.
  • gc_inspection.py: segfault
  • infinite_loop_re.py: takes a long time (this is not exactly a crasher, just a ReDoS)
  • mutation_inside_cyclegc.py: no error
  • recursive_call.py: hangs for a long time (this sets the recursion limit to a huge value and then does runaway recursion). I believe Mark Shannon's recent interpreter changes make it so this doesn't segfault. Interestingly, I can't kill the process with Ctrl-C, maybe a bug?
  • trace_at_recursion_limit.py: RecursionError (which is not a crash)
  • underlying_dict.py: segfault

I'll send a PR to make bogus_code_obj.py properly segfault again. Some of the other ones should perhaps be removed.

Linked PRs
  • gh-121922
  • gh-126360

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

检查 Lib/test/crashers 中列出的文件,从 bogus_code_obj.py、gc_inspection.py、mutation_inside_cyclegc.py、recursive_call.py、trace_at_recursion_limit.py 和 underlying_dict.py 开始。在当前的 CPython 构建上运行它们,并将其行为与 issue 报告进行比较,同时检查关联的 PR gh-121922 和 gh-126360。根据 crashers 当前的行为对其进行更新或删除,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
testing
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。