Commit Graph

112637 Commits

Author SHA1 Message Date
Nikita Popov
c5f1b384b5 Move shebang handling into the lexer
Instead of handling shebang lines by adjusting the file pointer in
individual SAPIs, move the handling into the lexer, where this is
both a lot simpler and more robust. Whether the shebang should be
skipped is controlled by CG(skip_shebang) -- we might want to do
that in more cases.

This fixed bugs #60677 and #78066.
2019-07-15 16:25:49 +02:00
Nikita Popov
17d4e86dda Merge branch 'PHP-7.3' into PHP-7.4 2019-07-15 15:20:36 +02:00
Nikita Popov
2d737a1e4b Merge branch 'PHP-7.2' into PHP-7.3 2019-07-15 15:20:15 +02:00
Nikita Popov
88ffe05797 Fix bug #77124
This is a backport of 6fcae63f61
to PHP 7.2.
2019-07-15 15:19:31 +02:00
Christoph M. Becker
37043e07df Sync mysqlnd version with PHP version
Since mysqlnd is solely developed in the php-src repository, it makes
not much sense to have its own version number, particularly since
nobody cares to update it.  Therefore we use PHP's version number, but
stick with the "mysqlnd" prefix which can be important to distinguish
the mysqli driver (libmysqlclient vs. mysqlnd).
2019-07-15 14:20:58 +02:00
Remi Collet
da1816c3d3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  typo [ci skip]
2019-07-15 14:17:23 +02:00
Remi Collet
ad48464ec2 typo [ci skip] 2019-07-15 14:17:13 +02:00
Remi Collet
c77f0506d0 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78269 password_hash uses weak options for argon2
  Fix #78269 password_hash uses weak options for argon2
2019-07-15 14:11:57 +02:00
Remi Collet
590d8f8263 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78269 password_hash uses weak options for argon2
2019-07-15 14:11:38 +02:00
Remi Collet
a7ff3a6483 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:11:30 +02:00
Remi Collet
eab0079c90 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:10:38 +02:00
Nikita Popov
d60d16bda6 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-15 13:49:29 +02:00
Nikita Popov
9ad094e371 Emit T_BAD_CHARACTER for unexpected characters
Avoid having holes in the token stream which are annoying and
inefficient to reconstruct on the consumer side.
2019-07-15 12:51:01 +02:00
Nikita Popov
193f28c7d5 Fixed bug #78010
Prevent the gc_info from becoming all zero for a registered root
by setting the top bit to one for compressed root addresses.
2019-07-15 12:00:30 +02:00
Sebastian Pop
af7639683f vectorize string-escape with NEON
On this benchmark:
function simple_string_escape() {
    $a = "test'asd'asd'' asd\'\"asdfasdf";
    for($i=0; $i<512; $i++) {
        $a .= chr($i%256);
    }
    for ($i = 0; $i < 100000; $i++) {
        if ($a === stripslashes(addslashes($a)))
            $a .= chr($i%256);
        else {
            echo "error at i=".$i."\n";
            return;
        }
    }
}
the execution time goes from 21.619s to 8.139s (165% speedup) on an A1 Graviton instance.

When removing the characters that need escaping, i.e., this benchmark:
function simple_string() {
  $a = "testasdasd asdasdfasdf";
  for ($i = 0; $i < 10000; $i++) {
      if ($a === stripslashes(addslashes($a)))
          $a .= "test dedeasdf";
      else {
          echo "error at i=".$i."\n";
          return;
      }
  }
}
the execution time goes from 2.932s down to 0.516s (468% speedup) on an A1 Graviton instance.
2019-07-15 11:35:08 +03:00
Nikita Popov
a520c24269 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-15 10:29:37 +02:00
Nikita Popov
3eb057c4a7 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-15 10:23:51 +02:00
Andrew Collington
768ad70f70 Fix bug #78291 Missing opcache directives
New opcache directives have been added recently which are returned
if using `ini_get_all('zend opcache')` but are not listed in the
directives if using `opcache_get_configuration()`.  This fix adds
those missing directives as well as if `opcache.mmap_base` is used
instead of `opcache.lockfile_path`.  Also adds a test to ensure the
directives match with both methods of fetching.
2019-07-15 10:22:47 +02:00
Peter Kokot
93b3d2f6ee Remove usage of PHP_AIX_LDFLAGS
These are currently not defined since their usage has been removed via
51ca2dba53
and
53349d69dd
2019-07-14 23:44:01 +02:00
Peter Kokot
94421e5724 Remove conditional calls of always available macros
These checks were once relevant for these extensions in PECL and PHP
versions without availability of the checked macros.

Closes GH-4405
2019-07-14 22:24:21 +02:00
Peter Kokot
e39296d10b Remove unsed zts check for sqlite3
This check was relevant with bundled sqlite library. Removed via
6083a387a8

Closes GH-4403
2019-07-14 21:06:15 +02:00
Peter Kokot
66c02cc0a1 Remove duplicate PTHREADS template define
The undef PTHREADS converts to define if thread safety is configured.
This step is already done by pthreads m4 macros from TSRM so this now
removes duplicated PTHREADS defines from php_config.h.
2019-07-14 14:45:27 +02:00
Peter Kokot
c72d6da461 Remove timelib outdated defines
- TIMELIB_OMIT_STDINT is not used anymore since
  a171f99cf0
- HAVE_GETTIMEOFDAY was defined multiple times in Windows headers
- ext/date/lib/timelib_config.h.win32 does not seem to be used

Closes GH-4400
2019-07-14 13:50:05 +02:00
Peter Kokot
7a6d737de7 Remove PHP_MYSQL variable
PHP_MYSQL variable was once defined by the ext/mysql (--with-mysql).

Closes GH-4399
2019-07-14 13:48:44 +02:00
Peter Kokot
f573ba1948 Update changelogs
- PHP-7.4 alpha, beta, RC versions already include bugs logged in the
  NEWS
- some links to RFCs
- php_error_docref0
2019-07-13 15:37:36 +02:00
Peter Kokot
4e0af6d862 Remove php_multiple_shlib_versions_ok
Variable usage was removed via
913cec6551
2019-07-13 15:06:35 +02:00
Peter Kokot
f3cf8966be Remove unused recode extension artefacts
Closes GH-4395
2019-07-13 14:52:36 +02:00
Peter Kokot
f5e4771824 Remove checks for always enabled spl and pcre
Closes GH-4397
2019-07-13 14:47:37 +02:00
Peter Kokot
499f2ac132 Remove WARNING_LEVEL fix for QNX
Fix is no longer relevant since the environment variable WARNING_LEVEL
is no longer used to define the value of the -w option for cc.

Closes GH-4398
2019-07-13 14:39:29 +02:00
Christoph M. Becker
8c76d898a9 Fix #78283: no output for explicit environment
This test does not work on Windows, if the child process has OPcache
enabled via php.ini, since TEMP is not set in the environment, so
OPcache can't find the base address file, and terminates the childs.

To avoid this (and potentially some other issues regarding missing
environment variables, such as PATH), we force the child process to
ignore any ini files.
2019-07-13 12:03:03 +02:00
Christoph M. Becker
bf242d58e7 Fix #78282: atime and mtime mismatch
The fix for bug #78241 assumed that `time_t` would always be 64bit, but
actually is 32bit for x86.  We therefore enforce 64bit arithmetic to
avoid wrapping.
2019-07-13 09:44:46 +02:00
George Peter Banyard
1c1de0c41a Convert all php_error_docref0 to php_error_docref
Closes GH-4394
2019-07-13 02:05:17 +02:00
Peter Kokot
33994ebd95 Remove tsrm_config_common.h
- Checks and defines are not relevant for files that include it anymore
- Some code is not used anymore
- Defines are a bit duplicated in zend_portability.h and TSRM.h file
- MAXPATHLEN defs moved to zend_virtual_cwd.h
2019-07-13 01:58:01 +02:00
Christoph M. Becker
a6fa097ceb No more need to cater to pre-PHP-5.3 or PHP-6 versions 2019-07-12 18:55:34 +02:00
Nikita Popov
0d568b9fd5 Don't split T_INLINE_HTML at partial PHP tag
If <?php occurs without required trailing whitespace, we should keep
it as part of a single T_INLINE_HTML region.
2019-07-12 17:22:11 +02:00
Nikita Popov
79b5b1a97f Merge branch 'PHP-7.3' into PHP-7.4 2019-07-12 16:51:52 +02:00
Nikita Popov
3f73916f10 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-12 16:51:47 +02:00
Nikita Popov
a7de2af46c Use TRY_ADDREF/TRY_DELREF in soap
The DELREF part is a possible fix for bug #78278, the ADDREF part
is a drive-by fix.
2019-07-12 16:50:43 +02:00
Nikita Popov
608f2112e9 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-12 16:30:47 +02:00
Nikita Popov
9d141f9889 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-12 16:30:33 +02:00
Nikita Popov
4a91f66b8f Fixed bug #78279
Even if we don't initialize the callback on every request, we
should still reset our globals to default values...
2019-07-12 16:29:18 +02:00
Christoph M. Becker
76783a9bcc Update NEWS and UPGRADING wrt. ext/recode unbundling 2019-07-12 14:35:44 +02:00
Christoph M. Becker
58b607c9ea Removed ext/recode
Cf. <https://wiki.php.net/rfc/unbundle_recode>.
2019-07-12 13:58:17 +02:00
Christoph M. Becker
8aa7865997 Swap implode() argument order in the test helper 2019-07-12 13:26:54 +02:00
Nikita Popov
e2c3bc80e3 Remove duplicate XtOffsetOf() definitions in php.h
These are already defined in zend_portability.h.
2019-07-12 13:18:18 +02:00
Nikita Popov
709897c2a5 Remove unused tsrm_strtok_r() function
There is also a php_strtok_r() function, which is actually used,
but nothing uses the tsrm_strtok_r() variant...
2019-07-12 13:14:24 +02:00
Nikita Popov
94d37a5dd7 Remove unnecessary uses of allow_url_include in tests 2019-07-12 12:54:34 +02:00
Nikita Popov
9345c191db Remove unnecessary uses of restore_include_path() in tests 2019-07-12 12:54:26 +02:00
Nikita Popov
2e56e14e39 Swap implode() argument order in some tests 2019-07-12 12:54:10 +02:00
Nikita Popov
9a274de4f4 Improve bless_tests
If a string var_dump contains a wildcard, also make the length a
wildcard.
2019-07-12 12:54:01 +02:00