Skip to content

[pull] master from php:master#101

Merged
pull[bot] merged 5 commits into
dolfly:masterfrom
php:master
Jul 31, 2025
Merged

[pull] master from php:master#101
pull[bot] merged 5 commits into
dolfly:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jul 31, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

iluuu1994 and others added 5 commits July 31, 2025 13:27
Since GH-17755 self and parent are compile-time resolved. We may now also
encounter this type error at runtime outside of the class itself.

Fixes GH-19304
The function pointer type declaration requires name to be a const char*
Generator::throw() on a running generator is not allowed. It throws "Cannot
resume an already running generator" when trying to resume the generator to
handle the provided exception.

However, when calling Generator::throw() on a generator with a non-Generator
delegate, we release the delegate regardless. If a Fiber was suspended in
the delegate, this causes use after frees when the Fiber is resumed.

Fix this by throwing "Cannot resume an already running generator" earlier.

Fixes GH-19326
Closes GH-19327
* PHP-8.3:
  Prevent throwing in running generator
* PHP-8.4:
  Prevent throwing in running generator
@pull pull Bot locked and limited conversation to collaborators Jul 31, 2025
@pull pull Bot added the ⤵️ pull label Jul 31, 2025
@pull pull Bot merged commit 659f55a into dolfly:master Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants