Nikita Popov [Tue, 1 Oct 2019 12:13:48 +0000 (14:13 +0200)]
Improve bless tests script to minimize diffs
Compute the diff between the old EXPECTF and the new output and
don't touch lines that still match the old EXPECTF. This reduces
the amount of manual fixup necessary after running bless_tests.php.
Nikita Popov [Tue, 1 Oct 2019 10:58:26 +0000 (12:58 +0200)]
Remove func copy optimization for private method with static vars
Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak, but unless
there's evidence that inherited private methods with static vars are
actually a common use-case, I don't think we should keep this kind
of fragile edge-case optimization.
Skip tests for old versions instead of marking them XFAIL
According to commit 0eea9a6[1], these tests fail with old Oniguruma
versions; we are not sure which version of Oniguruma is required to let
them pass, but at least 6.9.3 is sufficient.
Sergei Turchanov [Wed, 28 Aug 2019 04:37:52 +0000 (14:37 +1000)]
Fix #78413: php-fpm request_terminate_timeout does not take effect after fastcgi_finish_request
To retain legacy behavior I decided to add an option to control request
termination logic. If request_terminate_timeout_track_finished is set,
then request will be tracked for time limits even after
fastcgi_finish_request was called.
This patch depends on the fix provided in BUG 78469 (otherwise php-fpm
workers listening on named pipes on Windows will be erroneously terminated)
(PR #4636)
It is now only used to signal exceptions for property reads. ERROR
zvals are never returned back to the VM anymore, so there's no
need to check for them when receiving a VAR.
Also return MAY_BE_ERROR, as ERROR is now no longer relevant for
inference.
Add a max_depth option to unserialize and an unserialize_max_depth
ini setting, which can be used to control the depth limit. The
default value is 4096.
This option is intended to prevent stack overflows during the
unserialization of deeply nested structures.
This fixes bug #78549 and addresses oss-fuzz #17581, #17589, #17664,
and #17788.
* Avoid an unnecessary -lstdc++ dependency. It's not going to be
used in the end anyway, and is an unnecessary hassle to set up.
* Use $LIB_FUZZING_ENGINE instead of hardcoding -lFuzzingEngine.
These variables may not be initialized otherwise, but are passed to
another function; although it seems they are not used there, if not
having been initialized, MSVC complains.
Weirdly these warnings had zero coverage previously...
Remove an incorrect exception checking optimization: The key
lookup may throw (it could also throw previously, though only
through a custom error handler).
rename_variation2.tmp is ... unsurprisingly ... already used by
rename_variation2.phpt. Alternatively it could be placed in the
directory that the test creates, but maybe this is intended to
test cross-directory renames, so I'll leave it.
Resources used as array keys are generally handled by throwing a
notice and converting the resource to the resource handle. The only
exception is the [$resource => null] syntax, where this was treated
as an illegal offset type instead. However, this also only happened
for VM evaluations, the AST evaluator did handle resources correctly.
This also means that we can remove the corresponding special
handling for typed properites: We no longer need to check that a
property is convertible to stdClass if such a conversion might
take place indirectly due to a nested property write.
Additionally OBJ_W style operations now no longer modify the
object operand, and as such we no longer need to treat op1 as a
def in SSA form.
The next step would be to actually compile the whole LHS of OBJ_W
operations in R rather than W mode, but that causes issues with
SimpleXML, whose object handlers depend on the current compilation
structure.
Tyson Andre [Thu, 26 Sep 2019 23:58:34 +0000 (19:58 -0400)]
Update opcache zend_func_info after wbmp/xml_parser changes
See UPGRADING on the master branch.
```
- GD:
. The deprecated function image2wbmp() has been removed.
RFC: https://wiki.php.net/rfc/image2wbmp
. The deprecated functions png2wbmp() and jpeg2wbmp() have been removed.
RFC: https://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp
- XML:
. xml_parser_create(_ns) will now return an XmlParser object rather than a
resource.
```
We're getting some very large inputs (~500KB) on OSS-Fuzz, which
slot down performance a lot. Let's try limiting this, starting
with a still fairly large value of 64KB.
Also remove the max_execution_time limit, so that slow test cases
cause a genuine libfuzzer timeout and we may investigate them.