php / php/php-src

[Feature] get where "exit" was called/shutdown started

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

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

Feature Status: Needs Triage
主要言語
C
スター
40.4k
フォーク
8.1k
平均マージ
2日 13時間
マージ済み PR(30日)
96

説明

Description

There currently is no simple way to figure out what/where exit was called.

Since PHP 8.4 PHP is a proper function, however it seems it's xdebug won't break on it, even if set (besides the fact, there's tons of bugs with IDEs/xdebug when breaking on built-in functions, e.g. defined()

Stepping through the code until exit; is reached isn't feasible in all cases (it happens in a long running process, this might take a day...)

It would be great if there were a magic constant similar to __COMPILER_HALT_OFFSET__ that is available in shutdown function callbacks, which includes the last executed file + line in the main thread before shutdown started. But that's just a simple first suggestion, I'm open to everything that makes identifying/debugging this easier.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue では、ファイル、テスト、実装のエントリポイントが指定されていません。まず PHP インタープリターで exit 関数および shutdown 関数のコールバックがどのように処理されるかを追跡し、次に最後に実行されたファイルと行を公開する実現可能な方法を定義してください。完了条件は、動作が仕様化され、実装され、テストでカバーされていることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
c, php
領域
developer-experience, devtools
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。