1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Commit Graph

2065 Commits

Author SHA1 Message Date
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
Nikita Popov dda2074bf7 Merge branch 'PHP-7.3' into PHP-7.4 2019-02-22 13:42:13 +01:00
Nikita Popov 66fda0cdb1 Remove result def during jmp_set optimization 2019-02-22 13:41:47 +01:00
Nikita Popov ea115a617f Fix removal of unreachable code in SCCP
Due to a wrongly placed check, we were only performing the
unreachable code removal if there were loop vars...
2019-02-22 12:44:36 +01:00
Nikita Popov 4a98f42330 Merge branch 'PHP-7.3' into PHP-7.4 2019-02-22 12:00:35 +01:00
Nikita Popov 33c2b47de3 Merge branch 'PHP-7.2' into PHP-7.3 2019-02-22 12:00:20 +01:00
Nikita Popov 2cfb09caa7 Fix inference warning about missing key type 2019-02-22 11:55:16 +01:00
Nikita Popov bb75a53771 Fix get_unresolved_initializer for static props
For static props the offset is a simple index.
2019-02-22 11:25:52 +01:00
Dmitry Stogov 22691f9ef7 Use different method to suppress "false" memory leak reports 2019-02-22 10:11:43 +03:00
Nikita Popov 6b110b151d Fixed bug #77643
Resolve property initializers against the correct class, even when
parent slots are reused.
2019-02-21 10:59:30 +01:00
Nikita Popov 0989b70015 Print more precise warning for unresolved constants 2019-02-21 10:35:59 +01:00
Dmitry Stogov 16d0824aef Supress memory leak reports 2019-02-20 18:18:44 +03:00
Dmitry Stogov 4f2ad75dbe Remember __COMPILER_HALT_OFFSET__(s) in preloaded scripts 2019-02-20 17:10:10 +03:00
Nikita Popov c0e15a3b7f Implement fine-grained conflict handling
Tests can specify conflict keys, either in --CONFLICTS-- or
a per-directory CONFLICTS file. Non-conflicting tests may be run
in parallel.
2019-02-20 11:20:40 +01:00
Dmitry Stogov 12edc453e5 Disable preloading for sensetive opcache tests 2019-02-20 11:47:19 +03:00
Dmitry Stogov c143794dd9 Prevent error reporting during preloading request start-up 2019-02-20 11:35:56 +03:00
Dmitry Stogov 6b00238979 Order of classes may matter 2019-02-19 23:50:17 +03:00