Skip to content

Zend: refactor fast ZPP to only use zend_expected_type - #23105

Merged
Girgias merged 1 commit into
php:masterfrom
Girgias:2026-08-ZPP-error-refactor
Nov 16, 2026
Merged

Girgias merged 1 commit into
php:masterfrom
Girgias:2026-08-ZPP-error-refactor

Conversation

@Girgias

@Girgias Girgias commented Aug 7, 2026

Copy link
Copy Markdown
Member

Removing the usage of zpp_error and allowing 'slow' ZPP to reuse the error logic.

Based on #23052 and #23104

@devnexen

Copy link
Copy Markdown
Member

With this test (debug build)

set_error_handler(function($_, $m) { throw new Exception($m); });
class Test {
    static function test() {
        try { array_map("static::ok", [1]); } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), PHP_EOL; }
    }
    static function ok($x) { return $x; }
}
Test::test();

the new assertion fires.

@arnaud-lb arnaud-lb left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from David's comment

Removing the usage of zpp_error and allowing 'slow' ZPP to reuse the error logic
@Girgias
Girgias force-pushed the 2026-08-ZPP-error-refactor branch from ceea74a to b2a7ca4 Compare November 16, 2026 13:52
@Girgias
Girgias merged commit 5a37f6d into php:master Nov 16, 2026
17 of 18 checks passed
@Girgias
Girgias deleted the 2026-08-ZPP-error-refactor branch November 16, 2026 16:29
@Girgias

Girgias commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

I've merged this as the assertion should have been fixed after #24435 landed on master. And if there are other issues hopefully the fuzzer will pick it up soon enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants