1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests
Arnaud Le Blanc 6fa8a25a40 Prevent throwing in running generator
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
2025-07-31 14:26:41 +02:00
..
2025-07-01 18:50:41 +02:00
2025-06-25 03:20:49 +05:30
2021-10-11 16:01:57 +02:00
2021-10-11 16:01:57 +02:00
2025-06-25 03:20:49 +05:30
2021-10-11 16:01:57 +02:00
2021-10-11 16:01:57 +02:00
2021-10-18 12:45:26 +02:00
2021-11-16 12:45:33 +01:00
2021-11-24 15:18:31 +01:00
2022-05-11 11:43:01 +03:00
2022-12-19 12:11:16 +03:00
2022-02-11 15:16:08 +03:00
2022-09-19 13:12:49 +03:00
2022-03-20 20:54:36 +01:00
2022-03-20 20:54:36 +01:00
2022-03-20 20:54:36 +01:00
2022-03-20 20:54:36 +01:00
2022-03-20 20:54:36 +01:00
2023-04-16 15:34:56 +02:00
2023-04-16 15:34:56 +02:00
2023-03-06 15:03:19 +01:00
2025-06-25 03:20:49 +05:30
2024-01-14 19:12:41 +01:00
2024-03-26 12:33:44 +01:00
2024-03-26 12:33:44 +01:00
2024-03-26 12:33:44 +01:00
2025-05-19 19:05:32 +02:00
2023-07-25 17:54:14 +02:00
2022-09-26 11:43:38 +03:00