Commit Graph

11880 Commits

Author SHA1 Message Date
Nikita Popov
b870685c5b Fix leak on error in new serialization mechanism 2019-04-09 17:19:44 +02:00
Peter Kokot
e6a6017f78 Remove HAVE_STRERROR
Checking for the strerror function presence is no longer needed since it
is part of the C89 standard [1] and can be safely assumed that all
current systems have it.

Check in the configure.ac and Windows defined symbol are still left
until the file library (libmagic) will be updated.

[1]: https://port70.net/~nsz/c/c89/c89-draft.html
2019-04-08 23:39:45 +02:00
Nikita Popov
897cb8bc6f Merge branch 'PHP-7.3' into PHP-7.4 2019-04-08 13:00:20 +02:00
Nikita Popov
a90ac8b5b2 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-08 13:00:05 +02:00
twosee
bdac9ef10d Preserve keys in emulate_read_fd_set()
Keys are already preserved in the non-emulated case.
2019-04-08 12:58:46 +02:00
Nikita Popov
c3ca4dd53e Merge branch 'PHP-7.3' into PHP-7.4 2019-04-08 11:41:53 +02:00
Nikita Popov
08a3062816 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-08 11:41:48 +02:00
Nikita Popov
d7b5954f28 Fixed bug #77853 2019-04-08 11:40:50 +02:00
Nikita Popov
9e2937d0f2 Merge branch 'PHP-7.3' into PHP-7.4 2019-04-08 11:13:10 +02:00
Nikita Popov
0a25b41f6d Merge branch 'PHP-7.2' into PHP-7.3 2019-04-08 11:12:52 +02:00
Nikita Popov
eea61cda7d Fixed bug #77844
We should probably return an integer result from the operation in
typed mode, right now the result is always a string.
2019-04-08 11:11:58 +02:00
Peter Kokot
e06836a1a3 Remove checks for locale.h, setlocale, localeconv
The `<loccale.h>` header file, setlocale, and localeconv are part of the
standard C89 [1] and on current systems can be used unconditionally.

Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`,
`HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in
configure.ac [2] can be ommitted and simplifed.

The bundled libmagic (file) has also been patched already in version
5.35 and up in upstream location so when it will be patched also in
php-src the check for locale.h header is still left in the configure.ac
and in windows headers definition file.

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

Omit the bundled libmagic files
2019-04-07 18:32:54 +02:00
Peter Kokot
5f8915786f Remove HAVE_SIGNAL_H
The `<signal.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since file requires at least C89 or greater, the `HAVE_SIGNAL_H` symbol
defined by Autoconf in Zend.m4 [2] can be ommitted and simplifed.

The bundled libmagic (file) also ommits the usage of HAVE_SIGNAL_H since
5.35 however current version in PHP is very modified 5.34 version and
will be refactored separately. Check for HAVE_SIGNAL_H is therefore
still done in the configure.ac.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2019-04-07 15:55:34 +02:00
Peter Kokot
fd1ad1e25a Remove HAVE_LIMITS_H
The `<limits.h>` header file is part of the standard C89 headers [1]
and on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_LIMITS_H` symbol
defined by Autoconf in configure.ac [2] can be ommitted and simplifed
however due to bundled file library (libmagic) and timelib still using
it, the removal there was omitted and done only in Zend.m4 file.

Current bundled libraries libtime, oniguruma, and libmagic still include
partial `HAVE_LIMITS_H` usage and will be more refactored when this is
possible.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2019-04-07 15:20:02 +02:00
Stanislav Malyshev
3eae4f677a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Always use ZEND_SECURE_ZERO() when cleaning up data
  bump versions after release
2019-04-06 19:06:21 -07:00
Stanislav Malyshev
805a330681 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Always use ZEND_SECURE_ZERO() when cleaning up data
  bump versions after release
2019-04-06 19:06:16 -07:00
Stanislav Malyshev
d1d692abe7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Always use ZEND_SECURE_ZERO() when cleaning up data
  bump versions after release
2019-04-06 19:05:37 -07:00
Stanislav Malyshev
588db7cecf Always use ZEND_SECURE_ZERO() when cleaning up data
Optimizing compilers have an annoying tendency to throw out
memsets over data that they think aren't used anymore. Apply secure
zero-out in cases where this has potential to happen.
2019-04-06 18:15:42 -07:00
Anatol Belski
ddce7ada4c Implement stricter extension compatibility check
This hardens the dynamic module loading by checking the linker compatibility
between the core and the dynamic module. This likely should be extended
for the CRT as well, as 2015, 2017 and 2019 versions of Visual Studio
all have same DLL name for the CRT.
2019-03-31 14:26:00 +02:00
Anatol Belski
ba2269ab9e Fix memory leak 2019-03-30 23:04:52 +01:00
Joe Watkins
072eb6dd77
tsrm environment lock 2019-03-29 19:06:02 +01:00
Christoph M. Becker
6219815110 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test expectation
2019-03-29 09:58:37 +01:00
Christoph M. Becker
9d8b913de5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test expectation
2019-03-29 09:56:58 +01:00
Christoph M. Becker
0aa1a2c833 Fix test expectation
The `W32_SM_SENDMAIL_FROM_MALFORMED` error message will only be shown
if the `$additional_headers` parameter is passed to `mail`, which is
not the case for this test.  Instead we have to expect `BAD_MSG_RPATH`.
2019-03-29 09:55:04 +01:00
Sara Golemon
d124640704
Increase default time cost for argon2 password hashing 2019-03-27 00:36:19 -04:00
Nikita Popov
065255a0f8 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-25 17:46:28 +01:00
Nikita Popov
e4d9d91462 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-25 17:45:03 +01:00
Vlad Temian
ec2ecb7e12 Fix bug #77680: Correctly implement recursive mkdir on FTP stream
If the root directory was missing, an extra CWD without arguments was
made. Also, the MKD contained an empty string.

Now the CWD will use / and MKDs will be issued starting from the root
directory.
2019-03-25 17:43:46 +01:00
Nikita Popov
0b835e3e24 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-25 17:36:15 +01:00
Nikita Popov
e97577edde Fixed bug #77793
By making sure that we always first increment the refcount of the
new value before we destroy the old one.
2019-03-25 17:33:17 +01:00
Peter Kokot
f63829852e [ci skip] Remove text editor modelines
These were already removed 92ac598aab
and this fixes some leftovers. These files don't really need these
settings.
2019-03-23 21:09:38 +01:00
Remi Collet
cf25a3d64d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  ensure pcre.jit=1 for these tests
2019-03-22 15:02:13 +01:00
Remi Collet
bb47fb0783 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  ensure pcre.jit=1 for these tests
2019-03-22 15:01:49 +01:00
Remi Collet
2e9dccef78 ensure pcre.jit=1 for these tests 2019-03-22 15:00:31 +01:00
Nikita Popov
d373c11e71 Implement new custom object serialization mechanism
RFC: https://wiki.php.net/rfc/custom_object_serialization
2019-03-22 10:43:06 +01:00
Remi Collet
c1095cfed7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix test
2019-03-21 09:20:03 +01:00
Remi Collet
5c8d69bf6f fix test 2019-03-21 09:19:42 +01:00
Remi Collet
c8c86e76cf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix tests after fix for #76717
2019-03-20 14:08:30 +01:00
Remi Collet
cf65905974 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix tests after fix for #76717
2019-03-20 14:08:18 +01:00
Remi Collet
a467a89f16 Fix tests after fix for #76717 2019-03-20 14:07:26 +01:00
Nikita Popov
abc457fe1d Fixed bug #74345
Export zend_release_fcall_info_cache(). It is only necessary to
call it if the fcc may not have been used -- if it is passed to
zend_call_function() and friends, then they will take care of
freeing trampolines.
2019-03-20 12:06:42 +01:00
Nikita Popov
cfa2f0f598 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-19 10:03:11 +01:00
Nikita Popov
d53e9c7392 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-19 10:03:05 +01:00
Vlad Temian
fe2885d80a Fixed bug #77765
Set mode 40755 for directories, via FTP stream stat.

Because we already manage to CWD into the current directory,
we should set 40755 as mode, instead of 40644.
2019-03-19 10:02:38 +01:00
Fabien Villepinte
b6f9ade9f2 Remove unused variables 2019-03-17 23:29:51 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Nikita Popov
cc354a0790 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-11 15:36:40 +01:00
Nikita Popov
6818ca3c02 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-11 15:36:27 +01:00
Nikita Popov
1fd32e9c2f Fixed bug #76717
Print INT_MIN as -INT_MAX-1 to avoid it getting parsed as a float
literal due to integer overflow.
2019-03-11 15:35:02 +01:00
c9s
9f6f6fe219 Remove function_table var from the caller
function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL
2019-03-11 10:00:39 +01:00