- Issue created by @cleverhoods
Thanks for this.
This needs a merge request to be tested, and as you have said, some kind of a regression test.
I am updating this issue's tags according to the issue tag guidelines → .
- First commit to issue fork.
When rendering placeholders in replacePlaceholders() within Drupal 10.3x, a segmentation fault can occur due to improper handling of PHP Fibers. The issue arises because the $placeholder variable from the initial foreach loop is reused in the subsequent foreach loop in the following while loop. This leads to corruption of the Fibers, as they may access inconsistent or overwritten state during execution.
The segmentation fault occurs because Fibers rely on strict state management, and reusing the $placeholder variable introduces unintended side effects that compromise Fiber integrity.
The issue can be resolved by using distinct variable names for the foreach loop and the while loop to avoid unintended overwrites of the $placeholder variable. Specifically:
foreach loop, keep $placeholder as it is.foreach loop inside the while loop, introduce a separate variable, such as $fiber_placeholder, to manage Fiber processing.none
none
none
none
Fixed a segmentation fault issue in replacePlaceholders() caused by the reuse of the $placeholder variable across multiple loops. This issue was addressed by using distinct variable names to prevent Fiber corruption during placeholder rendering.
Active
10.3 ✨
render system
Thanks for this.
This needs a merge request to be tested, and as you have said, some kind of a regression test.
I am updating this issue's tags according to the issue tag guidelines → .