124445 Commits
Author SHA1 Message Date
Dmitry Stogov 0838d5a719 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80968 (JIT segfault with return from required file)
2021-05-20 16:51:21 +03:00
Dmitry Stogov 4135ce9d38 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80968 (JIT segfault with return from required file)
2021-05-20 16:50:14 +03:00
Dmitry Stogov 6e2d47e071 Fixed bug #80968 (JIT segfault with return from required file) 2021-05-20 16:45:24 +03:00
ada-u 7eef766c3d Add mysqli.rollback_on_cached_plink to php.ini-* 2021-05-20 15:44:57 +02:00
Dmitry Stogov f44ff44516 JIT/AArch64: Fixed incorrect MEM_LOAD usage 2021-05-20 14:43:49 +03:00
Dmitry Stogov 53021b4b9b JIT/AArch64: Fixed DWARF frame description for helper stubs 2021-05-20 12:14:29 +03:00
Nikita Popov 7742f31f32 Disable workaround for ICU bug on newer versions
This is issue https://unicode-org.atlassian.net/browse/ICU-12584,
which has been fixed in ICU 64.1 by
https://github.com/unicode-org/icu/commit/a9d219691398f0168150ad5a3e5f381f84ca95df.

I'm disabling the workaround for ICU >= 65, as we don't seem to be
doing minor version checks in intl.
2021-05-20 10:10:27 +02:00
Nikita Popov f9990009c8 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix handling of open_basedir that contains cwd
2021-05-20 09:53:57 +02:00
Nikita Popov ef59d09af0 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix handling of open_basedir that contains cwd
2021-05-20 09:53:25 +02:00
Nikita Popov ee7a8acde9 Fix handling of open_basedir that contains cwd
While resolving the path, the last step will reduce it down to ""
(an empty string) and realpath() will resolve this to getcwd().
If open_basedir contains the CWD, then that means open_basedir
will be bypassed for paths that don't have any components that
exist (if one of the components exists, then we abort the realpath
loop at that point).

Closes GH-7015.
2021-05-20 09:52:21 +02:00
Dmitry Stogov e5d2681074 JIT/AArch64: Link traces through exit tables.
1. Generate exit table at the end of each trace (list of unconditional branches for all side exit)
2. Jump to this table if conditional branch to side exit can't be performed because of limited jump distance (+/-1MB) (avoid extra veneers for side exits).
3. During trace linking, update targets of conditional branches to this exit table, if target trace can't be reachd because of limited jump distance (+/-1MB)
2021-05-20 02:53:00 +03:00
Dmitry Stogov 7358457aa7 JIT: Don't include zend_jit_trace_info.jmp_table_size into zend_jit_trace_info.code_size 2021-05-20 02:46:14 +03:00
Dmitry Stogov 45325bd425 JIT/AArch64: Fixed code alignment 2021-05-20 02:32:35 +03:00
Sara Golemon 99a79fdb53 Merge branch 'PHP-8.0'
* PHP-8.0:
  Prep for 8.0.8
2021-05-19 19:19:55 +00:00
Sara Golemon 64918fee97 Prep for 8.0.8 2021-05-19 19:18:56 +00:00
Nikita Popov b8e4d9f387 Use shell-free proc_open() in parallel run-tests.php 2021-05-19 20:46:50 +02:00
Dmitry Stogov d52fdd5056 DynASM/ARM64: Fixed incorrect ADRP instruction encoding (-4 => +4) 2021-05-19 18:21:01 +03:00
Nikita Popov 28c27cdbe5 Skip posix_setrlimit() test on FreeBSD
FreeBSD does not report an error on the second call, the limit is
simply not raised.
2021-05-19 16:59:27 +02:00
Nikita Popov 11bf5ccf62 Set default_socket_timeout in test
If the read is not refused outright, this will timeout, and we
don't want to wait 60s for that.
2021-05-19 15:29:38 +02:00
Nikita Popov 23c90dcdfb Report error from socket read on timeout
A timeout is not considered a transient error (at the socket layer),
and should return -1 rather than 0.
2021-05-19 15:29:16 +02:00
Nikita Popov 4c15dffe3a Reduce timeout in FTP PASV connection failure test
If the connection times out rather than being refused outright,
don't wait the full 60 seconds that are used by default. If this
happens, the error message will also be different.
2021-05-19 15:08:40 +02:00
Christoph M. Becker adb0e4f18d Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #81048: phpinfo(INFO_VARIABLES) "Array to string conversion"
2021-05-19 14:10:02 +02:00
Christoph M. Becker 5dfdd694e7 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81048: phpinfo(INFO_VARIABLES) "Array to string conversion"
2021-05-19 14:09:21 +02:00
Christoph M. Becker 36b9bdeeec Fix #81048: phpinfo(INFO_VARIABLES) "Array to string conversion"
Now that we properly dereference references of the superglobals. we
also need to dereference contained references to avoid to string
conversion.

Closes GH-7014.
2021-05-19 14:07:15 +02:00
Nikita Popov 0fd796133a Drop test that is always skipped
This test is skipped unconditionally, so I don't think there's
much point in keeping it.
2021-05-19 13:02:30 +02:00
Nikita Popov f31c531960 Merge branch 'PHP-8.0'
* PHP-8.0:
  Move preload_autoload assignment into preload_load()
2021-05-19 12:56:28 +02:00
Nikita Popov 62a9f97381 Move preload_autoload assignment into preload_load()
We need to set the preload autoloader even if preloading happened
in a different process. accel_preload() will only run in one.

In particular, this fixes the behavior if preload_user is used.
2021-05-19 12:55:46 +02:00
Nikita Popov 77201d7013 Avoid accessing localhost in some soap tests
On some systems, this can make these tests very slow, as they end
up waiting for a timeout.

Instead intercept the sent request using __doRequest().
2021-05-19 12:54:46 +02:00
Dmitry Stogov 9a907b2e17 JIT/AArch64: Combine ADRP+ADD+LDR into ADRP+LDR
before:
	adrp x15, #0xffff8ae5a000
	add x15, x15, #0xd90
	ldr d16, [x15]
after:
	adrp x15, #0xffff8ae5a000
	ldr d16, [x15, #0xd90]
2021-05-19 13:23:28 +03:00
Nikita Popov 2c6b85f6fe Remove bug49936.phpt
In the meantime, additional tests for ftp:// with opendir() have
been added, which tests actual behavior against a server. This one
just uses localhost (without running a server), which can make the
test very slow on systems that don't refuse the connection outright.
2021-05-19 12:14:16 +02:00
Dmitry Stogov ddb35fe14a JIT/AArch64: Use ADR/ADRP if it makes sense 2021-05-19 11:52:59 +03:00
Dmitry Stogov dec7b7493b DynASM/ARM64: Fixed incorrect ADRP instruction encoding
See: https://developer.arm.com/documentation/ddi0596/2021-03/Base-Instructions/ADRP--Form-PC-relative-address-to-4KB-page-
2021-05-19 11:51:30 +03:00
Nikita Popov 62cb7dc4f5 Disable FFI preload tests with opcache.preload_user 2021-05-19 10:36:55 +02:00
Nikita Popov 976dd997de Fix open_basedir tests when running from /tmp
If our cwd is in /tmp, these tests would fail. Use a directory
name that is less likely to clash.
2021-05-19 10:36:44 +02:00
Nikita Popov 7bc8f2c83f Skip unsupported socket option test on FreeBSD 2021-05-19 09:48:22 +02:00
Nikita Popov b9fbbcc867 Use different error condition in socket test
The previously used error does not occur on FreeBSD and instead
causes the operation to time out.

Also clean up the test a bit. And make sure it actually tests
something -- the point is that socket_last_error() should be 0
after socket_clear_error(). It's kind of pointless if the test
uses a wildcard for the final result instead.
2021-05-19 09:48:17 +02:00
Dmitry Stogov 2fabe2751c JIT/AArch64: Rename B_IMM26 into B_IMM. 2021-05-19 09:47:23 +03:00
Dmitry Stogov a6bb79f16d Correct DWARF frame description.
Now GDB correctly shows backtraces that involves JIT-ed code for
functional/tracing JIT, HYBRID/CALL VM, x86/AArch64 CPU.
(opcache.jit_debug=0x100 should be set).
2021-05-19 09:09:51 +03:00
Michael Voříšek fd8770edef Remove randominess from spl_object_hash 2021-05-19 01:39:35 +01:00
Dmitry Stogov 767a4af2c7 Introduce and use ZEND_JIT_TARGET_X86 and ZEND_JIT_TARGET_ARM64 macros.
Remove x86 specific code from ext/opcache/jit/zend_jit_arm64.dasc.
Fixed ARM64 build without libcapstone.
2021-05-18 21:59:32 +03:00
Nikita Popov 0123c99595 Fix bug55509.phpt skipif on FreeBSD 2021-05-18 19:35:03 +02:00
Nikita Popov 79c9028ca6 Relax error message expectation in socket test 2021-05-18 19:34:34 +02:00
Nikita Popov 06ea1a2502 Skip some strptime() tests on FreeBSD
tm_wday/tm_yday generally have unreliable behavior. What we're
testing is how glibc works.
2021-05-18 19:33:57 +02:00
Nikita Popov 5f090e06b4 Don't strictly check shmop size in test
On FreeBSD, this gets rounded up the page size.
2021-05-18 19:32:36 +02:00
Dmitry Stogov 5fe2062585 Correct DWARF frame description.
Now GDB correctly shows backtraces that involves JIT-ed code for
functional/tracing JIT, HYBRID/CALL VM, x86/AArch64 CPU.
(opcache.jit_debug=0x100 should be set).
2021-05-18 18:21:08 +03:00
Nikita Popov 11648c00e9 Don't include object hash in SplObjectStorage debug dump
The object hash is not particularly useful (anymore) and just
clutters the output. It encodes the same information as the
object ID, which is already part of the output.
2021-05-18 17:20:20 +02:00
Nikita Popov 485a42f495 Work around incorrect NSIG on FreeBSD 2021-05-18 17:07:06 +02:00
Nikita Popov d3e8ae1243 Drop PHP_FUNCTION declares from php_pcntl.h 2021-05-18 17:07:06 +02:00
Nikita Popov 87e76851e8 Fix posix getpwnum/getpwuid tests with empty passwd
On Linux passwd is "x", on FreeBSD it is just "".

Also switch the test to use EXPECTF, I don't see a reason why it
should use EXPECTREGEX.
2021-05-18 17:07:06 +02:00
George Peter Banyard db1bde73cf Use equals OR equal instead of >= && <=
For only two values this is clearer
2021-05-18 15:08:12 +01:00