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
David Carlier [Thu, 7 Feb 2019 14:23:27 +0000 (14:23 +0000)]
Adding bunch of FreeBSD socket options flags specifics.
SO_USER_COOKIE primarly to be traced via dtrace instrumentation.
If SO_USER_COOKIE is available, the rest is so the former is
two years old while the rest is from around 2008.