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).
Nikita Popov [Thu, 14 Feb 2019 10:28:13 +0000 (11:28 +0100)]
Remove bogus ctor checks in get_class_methods() + reflection
Contrary to the comments, these only hide constructors (old or new
style) if they a) are inherited b) come from a trait and c) are
aliased -- which doesn't make any sense at all.
Peter Kokot [Wed, 26 Sep 2018 17:29:25 +0000 (19:29 +0200)]
Refactor timelib.m4
The ext/date/lib is bundled library and also includes additional
timelib.m4 macros and checks specific for PHP.
All the checks in the timelib.m4 are already done in the PHP's
configure.ac:
- headers except for io.h and strings.h
- two functions checked strftime and gettimeofday
- if size of longint is 8
- if size of int is 4
- int32_t and uint32_t types using the PHP_CHECK_STDINT_TYPES
Macro `AC_TIMELIB_C_BIGENDIAN` defined in timelib.m4 is not used.
The two checkings for strtoll and atoll have been moved to date extension's
config0.m4 file.
Additional check for headers <io.h> and <strings.h> has been added to
config0.m4 of the date extension.
Therefore the timelib.m4 can be simplified and removed from the bundled
library to have easier maintenance in the later branches and also
upstream library.
Anatol Belski [Wed, 13 Feb 2019 02:30:55 +0000 (18:30 -0800)]
Change the way timer queue timer is deleted
As discussed in bug #77580, passing INVALID_HANDLE_VALUE for the
completion event improves compatibility with Wine/ReactOS. The timer
callback itself is supposed to complete fast enough, no behavior change
is to expect.
Rodrigo Prado [Thu, 16 Nov 2017 22:32:23 +0000 (20:32 -0200)]
Add test socket_setopt() basic functionality
Rodrigo Prado de Jesus royopa@gmail.com
User Group: PHPSP #PHPTestFestBrasil
---------------------------------------------------------------
The function was not coveraged yet
sockets Function socket_setopt no
http://gcov.php.net/viewer.php?version=PHP_HEAD&func=tested_functions