fix!: keep Rust panics on the Rust side of the FFI boundary - #786
Merged
Merged
Conversation
ptondereau
force-pushed
the
fix/ffi-panic-policy
branch
from
September 20, 2026 10:21
2818966 to
a8a7930
Compare
Coverage Report for CI Build 35506326831Coverage decreased (-0.1%) to 69.349%Details
Uncovered Changes
Coverage Regressions14 previously-covered lines in 6 files lost coverage.
Coverage Stats
💛 - Coveralls |
ptondereau
force-pushed
the
fix/ffi-panic-policy
branch
from
September 20, 2026 10:25
a8a7930 to
c055e75
Compare
ptondereau
force-pushed
the
fix/ffi-panic-policy
branch
from
September 20, 2026 10:41
c055e75 to
744c731
Compare
ptondereau
force-pushed
the
fix/ffi-panic-policy
branch
from
September 20, 2026 10:53
744c731 to
7543b95
Compare
ptondereau
marked this pull request as ready for review
September 20, 2026 11:32
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A Rust panic reached from PHP is now caught at every entry point the crate writes (generated handlers, constructors, closures, object handlers) and thrown as a PHP
Errorwith the messageRust panic: <message>, instead of aborting the PHP process;PhpException::throwis infallible,try_catchreportsCatchError::Panic, and a failing module startup returns the real ZendFAILUREso PHP refuses to start the module. Hooks and rawextern "C"callbacks the user hands to the engine still abort, which the guide and the v0.16 migration guide now document.Checklist