python / python/cpython

Update `Lib/test/crashers`

オープン
#121,921 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。