Repository navigation
Conversation
This was referenced Nov 9, 2026
Closed
ndossche
reviewed
Nov 10, 2026
| } else { | ||
| newdocp = xsltApplyStylesheetUser(style, doc, /* params (handled manually) */ NULL, /* output */ NULL, f, ctxt); | ||
| zend_try { | ||
| newdocp = xsltApplyStylesheetUser(style, doc, NULL, NULL, f, ctxt); |
Member
There was a problem hiding this comment.
Please keep the inline comments.
Also: how is this bailout triggered in practice?
Member
Author
There was a problem hiding this comment.
Restored. It needs a fatal error inside a php:function() callback (max_execution_time, E_USER_ERROR), after which only shutdown functions could still touch the processor. importStylesheet() already refuses there on master, so I dropped the zend_try rather than chase libxslt's half-built state.
php_xsl_apply_stylesheet() keeps the transformation's document reference in intern->doc and the callback node wrappers in the processor's node list, so a second transformation on the same processor, started from a php:function() callback or from main code while a Fiber is suspended inside one, freed that state under the running transformation. Throw an Error for such a call, as importStylesheet() already does.
iliaal
force-pushed
the
fix/xsl-nested-transform
branch
from
November 10, 2026 12:11
e9a2b87 to
c9220b1
Compare
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.
Starting a second transformation on an XSLTProcessor that is already transforming, from a php:function() callback or from main code while a Fiber is suspended inside one, overwrote the processor's document reference and callback node list under the running transformation, which then read freed memory. Throw an Error for such a call, as importStylesheet() already does.