diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-02 10:50:14 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-02 10:52:55 +0200 |
commit | 2e9e706a8271bbb42ad696c3383912facdd7d45f (patch) | |
tree | 3abd9d7445f6263693ff2f4adc068fd9aa1dc4ae /Zend/zend_generators.c | |
parent | a07c1f56aac1c0f6c8334760009b678cbf9d6138 (diff) | |
download | php-git-2e9e706a8271bbb42ad696c3383912facdd7d45f.tar.gz |
Fix throwing of yield from related exceptions into generator
Use the general zend_generator_throw_exception() helper for this.
Otherwise we don't handle the off-by-one opline correctly (should
we maybe just stop doing that?)
This is a followup to ad750c3bb6e7b48384c6265eb9d3bcf5b4000652,
which fixed a different yield from exception handling problem that
happened to show up in the same test case from oss-fuzz #25321.
Now both issues should be fixed.
Diffstat (limited to 'Zend/zend_generators.c')
-rw-r--r-- | Zend/zend_generators.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index bb3260b11b..0ed92f4ca2 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -740,7 +740,7 @@ static int zend_generator_get_next_delegated_value(zend_generator *generator) /* return SUCCESS; exception: - zend_rethrow_exception(generator->execute_data); + zend_generator_throw_exception(generator, NULL); failure: zval_ptr_dtor(&generator->values); |