Error when killing script: Object of class UnwindExit could not be converted to string
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.1k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
I am running PHP 8.2.8 and PHP 8.3.0 Beta 1, and at times, I get this error when killing a cli script:
Object of class UnwindExit could not be converted to string
It's been tricky to reproduce, but I can intermittently get the error by:
- Unzip attached code.zip.
- Run: php -n test.php
- Immediately press Ctrl-C.
If no errors appear, repeat running the script and pressing Ctrl-C.
The error I get is:
Warning: Uncaught Error: Object of class UnwindExit could not be converted to string in /tmp/test/a.php:2
Stack trace:
#0 /tmp/test/test.php(4): require()
#1 /tmp/test/test.php(14): {closure}('a')
#2 {main}
thrown in /tmp/test/a.php on line 2
Fatal error: During class fetch: Uncaught in /tmp/test/a.php on line 2
I believe the error comes up when the script is killed while one of the classes is being loaded.
Please let me know if I can provide more information to narrow it down.
Thanks for your help.
PHP Version
PHP 8.2.8 and PHP 8.3.0 Beta 1
Operating System
Linux
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
code.zip を展開し、/tmp/test/test.php と /tmp/test/a.php から始めます。php -n test.php を実行し、スクリプトがクラスを読み込んでいる間に Ctrl-C を押します。この再現に関連する CLI の割り込みとクラス読み込みの経路を追跡します。スクリプトを強制終了したときに、断続的な UnwindExit 変換エラーが発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, php
- 領域
- backend, cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100