Nikita Popov [Mon, 18 Feb 2019 14:36:39 +0000 (15:36 +0100)]
Make parallel run-tests compatible with IO capture tests
Inherit the main stdin/stdout/stderr streams into the worker processes.
We don't talk to workers via these pipes, so there shouldn't be a
problem doing this.
Tyson Andre [Mon, 18 Feb 2019 14:35:45 +0000 (09:35 -0500)]
Fixed bug #77631
Do not include unbound anonymous classes in get_declared_classes().
Note that earlier PHP versions would include the anonymous class in
get_declared_classes(), and return false until the class was bound,
but would not crash.
Joe Watkins [Tue, 19 Feb 2019 08:08:38 +0000 (09:08 +0100)]
ZEND_COMPILE_EXTENDED_INFO split Currently a tool may not decide between debugging and profiling behaviour: We split ZEND_COMPILE_EXTENDED_INFO into ZEND_COMPILE_EXTENDED_FCALL and ZEND_COMPILE_EXTENDED_STMT We define ZEND_COMPILE_EXTENDED_INFO as ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL
Nikita Popov [Mon, 18 Feb 2019 13:01:45 +0000 (14:01 +0100)]
Make MADV_HUGEPAGE conditional on USE_ZEND_ALLOC_HUGE_PAGES
There have been multiple reports of large slowdowns due to the
use of MADV_HUGEPAGE, so make it conditional on
USE_ZEND_ALLOC_HUGE_PAGES, just like MAP_HUGETLB already is.
Nikita Popov [Mon, 18 Feb 2019 09:44:50 +0000 (10:44 +0100)]
Don't catch opcache_compile_file failures during preloading
Compiler failures are not side-effect free, they may leave behind
parts of the file that were successfully compiled before the
failure occurred. The preloading code is not prepared to deal with
this.
Peter Kokot [Sat, 6 Oct 2018 19:39:29 +0000 (21:39 +0200)]
Move some scripts from root directory to scripts/dev/
At the time of this commit, there is a dedicated folder for development
related tools and such scripts might fit better there to not bloat the
project root directory too much.
> @hikari-no-yume Please feel free to directly commit the first commit
> (to PHP-7.4). That's probably a big and unnecessary source of
> conflicts, and makes reviewing harder as well.
Deprecate case-insensitive constants via typelib import
As of PHP 7.3.0, case-insensitive constants are deprecated. We catch
up on this with regard to ext/com_dotnet, which allows to import
constants from typelibs, by triggering a deprecation notice whenever
`com_load_typelib()` is called with `$case_sensitive` being `false`,
and whenever `com.autoregister_casesensitive` is set to `false`,
regardless of whether there are actually constants in the typelib which
would be imported.
Nikita Popov [Fri, 15 Feb 2019 11:30:36 +0000 (12:30 +0100)]
Add preloading support for typed properties
During preloading, try to resolve all property types to CEs. Add a
flag that tracks this. If not all property types can be resolved,
then the class is not eligible for preloading.
Nikita Popov [Fri, 15 Feb 2019 10:20:28 +0000 (11:20 +0100)]
Assign (un)serialize_func during compilation
This avoids writing this cache at runtime, which is illegal if
preloading is used.
Not every serialize/unserialize function actually belongs to the
Serializable interface, but I think it's not a problem to assign
these anyway -- whether they are used ultimately depends on whether
Serializable is implemented.
Alternatively it might make sense to just drop these entirely. I
don't think this is performance critical functionality.
Fix #77621: Already defined constants are not properly reported
We must not check uninitialized values (i.e. `c.value`), and we have to
use proper types for printf-style formats (i.e. `char *` instead of
`zend_string *`).
Rodrigo Prado [Thu, 14 Feb 2019 19:12:00 +0000 (20:12 +0100)]
Small change in the test to pass
This test was not passing because the VM called by travis CI is slow, see below the failure:
http://gcov.php.net/viewer.php?version=PHP_HEAD&func=tests&file=ext%2Ffileinfo%2Ftests%2Fcve-2014-3538-mb.phpt
User Group: PHPSP #phptestfestbrasil
http://phpsp.org.br/
David Walker [Thu, 15 Feb 2018 05:06:34 +0000 (22:06 -0700)]
Fixed bug #75921
Ensure that the "creating default object from empty value" warning is
always thrown. Previously some cases were missing the warning, in
particular those going through FETCH_OBJ_W rather than a dedicated
opcode (like ASSIGN_OBJ).
One slightly unfortunate side-effect of this change is that something
like $a->b->c = 'd' will now generate two warnings rather than one
when $a is null (one for property b, one for property c).