1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

2081 Commits

Author SHA1 Message Date
Dmitry Stogov ec5f7df732 Use ZEND_HASH_FOREACH with direct callback, instead of callbacks 2019-04-30 14:50:01 +03:00
蝦米 e4ed2bf922 fix typo 2019-04-30 09:18:17 +02:00
Dmitry Stogov 8cdd215894 Also, use ZEND_ACC_PRELOADED for classes 2019-04-30 02:07:02 +03:00
David Carlier bb06030bf7 Little detection change proposal.
As pointed out, the further path is called by open rather than shm_open.
2019-04-27 21:18:27 +02:00
Dmitry Stogov db2ffcf157 Optimize constant SWITCH_LONG and SWITCH_STRING 2019-04-24 00:08:17 +03:00
Dmitry Stogov 4d0d7ce349 Don't eliminate BIND_STATIC if it may cause undefined constant warning 2019-04-23 22:39:14 +03:00
Dmitry Stogov 1827d784b5 Remove unused BIND_STATIC insructions 2019-04-23 02:21:08 +03:00
Dmitry Stogov abacb5e8ea Fixed wrong opline 2019-04-22 11:05:56 +03:00
Fabien Villepinte baa9669392 Fix typo in comments 2019-04-19 13:11:50 -03:00
Dmitry Stogov 663056aa5f Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  It's safe to keep old string if it's stored not in SHM.
2019-04-17 22:08:55 +03:00
Dmitry Stogov bfadd9fdaf It's safe to keep old string if it's stored not in SHM. 2019-04-17 21:57:17 +03:00
Nikita Popov 487d4d07b4 Remove some uses of deprecated internal_encoding settings in tests 2019-04-17 14:24:11 +02:00
Dmitry Stogov 3ccd3aba90 Eliminate FETCH $GLOBALS followed by FETCH_DIM/UNSET_DIM/ISSET_ISEMPTY_DIM 2019-04-17 11:52:56 +03:00
Rodrigo Prado f1dbe6160c Remove functions from func_info that were removed in PHP 7 2019-04-15 10:04:41 +02:00
Nikita Popov 339b0af429 Avoid misc uninitialized variable warnings 2019-04-12 15:12:39 +02:00
Nikita Popov 49ce7c0014 Remove odd variable assignment in escape_analysis
As we are breaking out of the for loop setting i = ssa_vars_count
doesn't do anything, but it confuses GCC into throwing a no-overflow
assumption warning.
2019-04-12 11:56:37 +02:00
Dmitry Stogov 88a2268d6b Replace "ZEND_CALL_CTOR" hack by additional live-range 2019-04-12 00:49:45 +03:00
Nikita Popov eb8c07fe2f Support VirtualProtect for opcache.protect_memory
Don't enable this on AppVeyor yet, as there is still an open
issue in phar.
2019-04-10 15:31:18 +02:00
Anatol Belski db7aba538d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix phar:// include handling with file cache
2019-04-10 14:57:04 +02:00
Anatol Belski 1aa30bb71c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix phar:// include handling with file cache
2019-04-10 14:56:29 +02:00
Anatol Belski f31d7ca85e Fix phar:// include handling with file cache 2019-04-10 14:55:15 +02:00
Dmitry Stogov dd4d43c97d Remove RC1 and RCN from scalar types. 2019-04-03 12:38:25 +03:00
Dmitry Stogov c941f1d8c7 Fixed SCCP support for ZEND_ASSIGN_OBJ_REF 2019-04-03 11:22:59 +03:00
Dmitry Stogov e03f532829 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed CFG construction for SWITCH opcodes
2019-04-03 03:11:15 +03:00
Dmitry Stogov 0f811bb7b6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed CFG construction for SWITCH opcodes
2019-04-03 03:09:47 +03:00
Dmitry Stogov 56a5d0bd91 Fixed CFG construction for SWITCH opcodes 2019-04-03 03:09:03 +03:00
Dmitry Stogov 9ef2377d33 array_merge() may return argument with incremented reference counter 2019-04-03 00:44:31 +03:00
Nikita Popov 251f293cb7 Make line numbers for inheritance errors more precise
Use the line of the conflicting child method, rather than either the
first or last line of the class.
2019-03-27 12:42:35 +01:00
Nikita Popov 0122f395c7 Add zend_error_at API that accepts a filename and lineno
Use this for the opcache preloading warnings, as an example usage.
2019-03-26 15:47:00 +01:00
Nikita Popov a9b01b60d8 Make PCRE cache per-request on CLI
There will only be one request on the CLI SAPI, so there is no
advantage to having a persistent PCRE cache. Using a non-persistent
cache allows us to use arbitrary strings as cache keys.
2019-03-26 10:10:41 +01:00
Peter Kokot 38b22448f8 Remove extension readmes
This patch removes several extension readmes in favor of the PHP manual
and where possible.
2019-03-19 20:25:32 +01:00
Christoph M. Becker 9ca9394f5b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Simplfy test case
2019-03-18 14:59:08 +01:00
Xinchen Hui ab8782d1e6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Simplfy test case
2019-03-18 19:30:11 +08:00
Xinchen Hui e072537e7f Simplfy test case
(I was working on the same bug while nikic committed the similar fix
2019-03-18 19:28:23 +08:00
Nikita Popov f7abb1e253 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-18 10:51:20 +01:00
Nikita Popov da7add3525 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-18 10:51:00 +01:00
Nikita Popov 54bf8c820f Fixed bug #77743 2019-03-18 10:49:53 +01:00
Peter Kokot ccc29473ec Sync AC_CHECK_SIZEOF m4 macro calls
- AC_CHECK_SIZEOF is now called mostly only in PHP_CHECK_STDINT_TYPES()
  macro except for some parts checking for the 32 or 64 bit architecture.
- SIZEOF_CHAR removed since it is always 1
- ZEND_BIN_ID is now of a more logical pattern `BIN_48888` on 64bit
  architectures and `BIN_44444` on 32bit instead of literal string
  `BIN_SIZEOF_CHAR48888` on 64bit and `BIN_SIZEOF_CHAR44444` on 32bit.
  The unneeded SIZEOF_CHAR part has been removed.
- XMLRPC_TYPE_CHECKS removed
- The `long long int` is the same as `long long` and redundant checks
  removed accordingly.
- Removed PHP_CHECK_64BIT macro. Checking if current platform is 64bit
  or not can be also done simply by using a check of the long type on
  place. This removes redundant m4 macro PHP_CHECK_64BIT.
2019-03-18 02:11:23 +01:00
Fabien Villepinte 26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Peter Kokot 3a857852a8 Remove HAVE_STRFTIME
Function strftime is part of the C89 standard [1] and current systems
don't need to check for its presence anymore.

Additionally, checks for strftime function in tests have been removed
since the PHP strftime function is now always available.

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 19:42:29 +01:00
David Carlier f8a2497584 Fix shm api detection test for opcache module on FreeBSD
Per man page the shm_open path should start with / and contain no
further slashes.
2019-03-11 10:19:35 +01:00
Peter Kokot 9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot bebcdcc745 Remove legacy AC_CHECK_TYPE calls for uint and ulong
The AC_CHECK_TYPE was refactored in more recent versions of Autoconf
and the call with two arguments is obsolete and not recommended anymore.

This patch also refactors some leftovers of using ulong and uint which
are not standard nor common usages of types in C.

The ulong can be used as zend_ulong and uint usage is actually
`unsigned int`.

The usage of HAVE_ULONG removed since it is not used in current code
base.

Legacy edgecase for some legacy HPUX systems removed:
- sys/stream.h header is not checked and the HAVE_SYS_STREAM_H is
  not defined with current build system.

- flags are unsigned int
- max_allowed_packet changed to unsigned int
2019-03-06 22:49:16 +01:00
Stanislav Malyshev db777e9199 Fix shifting signed values too far
Signed shift of 31 for int and 63 for long is flagged as undefined
behavior by UBSan (-fsanitize=undefined) and seems to be indeed so
according to the standard.

The patch converts such cases to use unsigned.
2019-03-06 00:50:09 -08:00
Nikita Popov ade5474792 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-04 13:16:25 +01:00
Nikita Popov 4c68aaabf1 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-04 13:16:01 +01:00
Nikita Popov 3f00c9367d Fixed bug #77691
We cannot replace an op1_def opcode with an ASSIGN, if it also has
a used res_def. Usually this doesn't happen because the res_def use
can be eliminated first. The example is a case where operand replacement
on the res_def use fails.
2019-03-04 13:11:12 +01:00
Dmitry Stogov 7d5e2e532c Enable Posix Shared Memory on Linux 2019-03-01 12:15:56 +03:00
Nikita Popov 105a04aaac Don't remove CONST CAST in CONCAT operand
CONCAT assumes that CONST operands are strings, so we cannot
blindly remove CAST operands.
2019-02-28 16:42:30 +01:00
Nikita Popov 1b998bb9cb Remove unnecessary convert_to_string_safe macro
I'm assuming that the reason this existed was to avoid modifying
an interned string. However, the current code handles this case
fine already.
2019-02-28 16:30:05 +01:00