php / php/php-src

zend_compile_implements() assumes that the class entry has no interfaces already

Aperta
#22,354 0 commenti 1 reazione 1 assegnatario Vedi su GitHub

@DanielEScherzer ci sta già lavorando.

Dal 17/6/2026.

  • #22355 di @DanielEScherzer — aperta
Bug Category: Engine Status: Verified
Lingua principale
C
Stelle
40.4k
Fork
8.1k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

Description

See https://github.com/php/php-src/blob/b0c78657949289c87d36eda5385d032294c40118/Zend/zend_compile.c#L8959-L8977

If an attribute validator added an interface to the class, it gets silently dropped and triggers leaks, because class attributes are compiled before implements, see

https://github.com/php/php-src/blob/b0c78657949289c87d36eda5385d032294c40118/Zend/zend_compile.c#L9110-L9116

Discovered while working on https://github.com/DanielEScherzer/CustomCast, not sure if I noticed this earlier and just didn't report it but it has been there for a while

PHP Version
8.4+
Operating System

No response

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.