<feed xmlns='http://www.w3.org/2005/Atom'>
<title>snuffleupagus/src/tests/disable_function/disabled_function_echo_2.phpt, branch optim85</title>
<subtitle>Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest! 
</subtitle>
<id>http://git.dustri.org/snuffleupagus/atom?h=optim85</id>
<link rel='self' href='http://git.dustri.org/snuffleupagus/atom?h=optim85'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/'/>
<updated>2026-05-09T23:01:43Z</updated>
<entry>
<title>Prevent opcache from inlining functions with return-value rules on PHP 8.5+</title>
<updated>2026-05-09T23:01:43Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-09T23:01:43Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=5f754c32df4bd8643d62babf6f805defe59c8c92'/>
<id>urn:sha1:5f754c32df4bd8643d62babf6f805defe59c8c92</id>
<content type='text'>
PHP 8.5's opcache optimizer can inline trivial user functions (constant
return values), completely eliminating the DO_UCALL opcode. When this
happens, zend_execute_ex is never invoked and snuffleupagus's
return-value monitoring hooks never fire.

Fix this by setting ZEND_ACC_HAS_TYPE_HINTS on monitored functions'
op_arrays during compilation (via sp_op_array_handler). This flag is
checked by opcache's zend_try_inline_call() and prevents inlining.
For 0-arg functions — the only ones eligible for inlining — there are
no RECV opcodes, so the runtime impact is zero.

To enable sp_op_array_handler when return-value rules are configured,
the extension now registers itself as a zend extension and sets
ZEND_COMPILE_HANDLE_OP_ARRAY (previously only done for global_strict).

The disabled_function_echo_2 test is updated to use separate echo
statements and opcache.optimization_level=0, since opcache's echo
merging is a compile-time string concatenation that cannot be prevented
per-function.

This is a bit ugly, but it's the less awful solution to be able to hook return
values.
</content>
</entry>
<entry>
<title>Skip a test on ≥PHP8.5</title>
<updated>2026-05-09T22:09:44Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-09T22:09:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=0cc8e708ebbff02abe7e3c2d0dc0660585ccd98c'/>
<id>urn:sha1:0cc8e708ebbff02abe7e3c2d0dc0660585ccd98c</id>
<content type='text'>
PHP is now optimizing `echo A,B,C` into `echo A B C`, so the test is pointless.
</content>
</entry>
<entry>
<title>Fix the CI for PHP8.2</title>
<updated>2023-01-04T18:10:38Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-01-04T18:06:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=1bf0f3ec9088d34383c564d6306901ae6dc94cb5'/>
<id>urn:sha1:1bf0f3ec9088d34383c564d6306901ae6dc94cb5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mark some tests as passing on php8</title>
<updated>2020-12-25T14:43:10Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2020-12-25T14:43:10Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=f549ae50d3c47fb8a59aa8efb974ac5908591427'/>
<id>urn:sha1:f549ae50d3c47fb8a59aa8efb974ac5908591427</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Mark the relevant php8 tests as broken (#359)</title>
<updated>2020-12-12T19:33:14Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2020-12-12T18:57:48Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=5329a55bfd2b00d617a40d587cd37050d964ccbf'/>
<id>urn:sha1:5329a55bfd2b00d617a40d587cd37050d964ccbf</id>
<content type='text'>
* Skip tests broken on php8

* Oops

* Fix some tests

* Add some XXE tests for php8

* Fix a test
</content>
</entry>
<entry>
<title>In tests, don't `die("skip")` but `print "skip"` instead (#358)</title>
<updated>2020-12-01T08:47:51Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2020-12-01T08:47:51Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=3b68dad2122d7e4a87a60f7161b7bc35d7c9b708'/>
<id>urn:sha1:3b68dad2122d7e4a87a60f7161b7bc35d7c9b708</id>
<content type='text'>
This is required since the `die` is making php8 choke</content>
</entry>
<entry>
<title>Fix #338 - added log type if type is simulation, drop or log. (#339)</title>
<updated>2020-07-21T09:58:22Z</updated>
<author>
<name>Giovanni</name>
</author>
<published>2020-07-21T09:58:22Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=b90e0ecc6b0717786ae72236c37157f1b5983521'/>
<id>urn:sha1:b90e0ecc6b0717786ae72236c37157f1b5983521</id>
<content type='text'>
Co-authored-by: Giovanni Dante Grazioli &lt;giovanni.dantegrazioli@nbs-system.com&gt;</content>
</entry>
<entry>
<title>Log ip addresses</title>
<updated>2019-11-03T13:49:03Z</updated>
<author>
<name>kkadosh</name>
</author>
<published>2019-11-03T13:49:03Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=b1a4af56f09a9469eeaf006480804451e60fe411'/>
<id>urn:sha1:b1a4af56f09a9469eeaf006480804451e60fe411</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reorganize the testsuite</title>
<updated>2019-01-14T19:29:25Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2019-01-14T19:29:25Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=e79f7e3bd992c7f0915ef9afe7afb6d79740527a'/>
<id>urn:sha1:e79f7e3bd992c7f0915ef9afe7afb6d79740527a</id>
<content type='text'>
Splitting the testsuite in several components makes it easier to manage and comprehend.
This was also needed some some tests aren't passing on Alpine Linux, but we still want to run
as many of them as we can on this platform.</content>
</entry>
</feed>
