php / php/php-src

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

Aperta
#17,505 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Feature Status: Needs Triage
Lingua principale
C
Stelle
40.4k
Fork
8.1k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

L’issue non indica file, test o punti di ingresso dell’implementazione. Inizia tracciando come vengono gestiti i callback delle funzioni exit e shutdown nell’interprete PHP, quindi definisci un modo praticabile per esporre l’ultimo file e l’ultima riga eseguiti; il lavoro è completo quando il comportamento è specificato, implementato e coperto da test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
c, php
Ambito
developer-experience, devtools
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.