1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Commit Graph

124212 Commits

Author SHA1 Message Date
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
Máté Kocsis
a5e938dc86 Declare dynamic properties in ext/dom
Closes GH-6644
2021-05-18 15:12:35 +02:00
Derick Rethans
8d715b8416 Merge branch 'master' of github.com:php/php-src 2021-05-18 13:46:36 +01:00
Derick Rethans
5132d0b284 Merge branch 'PHP-8.0' 2021-05-18 13:46:14 +01:00
Derick Rethans
6bc7370532 Merge branch 'PHP-8.0' of github.com:php/php-src into PHP-8.0 2021-05-18 13:46:04 +01:00
Nikita Popov
446471b99b Remove error suppression from zend_optimizer_eval_binary_op()
All error conditions should be handled by
zend_binary_op_produces_error().

Pointed out by Girgias.
2021-05-18 14:45:55 +02:00
Derick Rethans
555b18794c Merge branch 'PHP-8.0' 2021-05-18 13:45:32 +01:00
Derick Rethans
8cd6acd69b Merge branch 'PHP-7.4' into PHP-8.0 2021-05-18 13:45:14 +01:00
Máté Kocsis
8f411006a3 Merge branch 'PHP-8.0'
* Fix some nullable return types in ext/simplexml
2021-05-18 14:44:53 +02:00
Derick Rethans
3938bfb564 The PHP 7.4 branch is now for 7.4.21 2021-05-18 13:44:01 +01:00
Máté Kocsis
eedc988a4e Fix some nullable return types in ext/simplexml
Closes GH-7004
2021-05-18 14:43:36 +02:00
Dmitry Stogov
dae662ffbc Fixed zend_long_is_power_of_two/zend_long_floor_log2 mess 2021-05-18 15:32:36 +03:00
Dmitry Stogov
d6d0b1c389 Remove unnecessary #ifdef 2021-05-18 15:32:36 +03:00
Dmitry Stogov
f70ac416c3 Fixed possible failure when repair after overflow detection 2021-05-18 15:32:36 +03:00
Dmitry Stogov
a69701de2e Fix "store to misaligned address" ASAN warnings 2021-05-18 15:32:36 +03:00
Dmitry Stogov
d6bf98428d Fixed format specifier 2021-05-18 15:32:35 +03:00
Dmitry Stogov
f15f01aed7 JIT/AArch64: disable register allocation for expected ++/-- overflow case.
This fixes ext/opcache/tests/jit/inc_021.phpt with tracing JIT.
2021-05-18 15:32:35 +03:00
Dmitry Stogov
fc3157ea0f Generate veneers to perform long jumps.
This makes symfony_demo app working with -d opcacge.jit=1205.
(21 MB of JIT-ed code).
2021-05-18 15:32:35 +03:00
Dmitry Stogov
0e8fc156f8 DynASM/ARM64: Add abiulity to plug-in generation of veneers to perform long jumps. 2021-05-18 15:32:35 +03:00
Dmitry Stogov
59ef219994 Fixed ZTS build. 2021-05-18 15:32:35 +03:00
Dmitry Stogov
8970b684e9 Use symbolic labels for BL and ADR instructions 2021-05-18 15:32:35 +03:00
Dmitry Stogov
e1e050d752 Use better code for trace exits. Don't store CPU registers that can't be used by deoptimizer. 2021-05-18 15:32:35 +03:00
Dmitry Stogov
43b138852e Remove unused TMP4. Use intra-precedure call scratch registers for TMP2 and TMP3. 2021-05-18 15:32:35 +03:00
Dmitry Stogov
78cdb2a7a0 Allow to print JIT assemble without binary addresses (opcache.jit_debug=0x001) and with (opcache.jit_debug=0x401) for both ARM and x86. 2021-05-18 15:32:35 +03:00
Dmitry Stogov
5dd539b866 Fixed JIT memory usage debug info (opcache.jit_debug=0x200) 2021-05-18 15:32:35 +03:00
Dmitry Stogov
94ce76a331 Implemented AArch64 support for GDB/JIT interface.
Stack frame description is not accurate, so backtraces that involved
JIT-ed code may be brocken. Disassemble and breakpoints on JIT-ed code
work fine.
2021-05-18 15:32:35 +03:00
Dmitry Stogov
b5aa339cfd Reenable PROFITABILITY_CHECKS 2021-05-18 15:32:35 +03:00
Dmitry Stogov
da2bed357a Fixed incorrect range check (missed sign bit) 2021-05-18 15:32:35 +03:00
Hao Sun
1a6bcd0f80 Fix commit 8143a49: macro ADD_SUB_64_WITH_CONST_32 should be used
"(struct.._offset+offsetof(zend_..struct, field))" might exceed the
range of ADD_SUB_IMM, leading to DynASM error DASM_S_RANGE_I for
ZTS+CALL test variant.

Using macro ADD_SUB_64_WITH_CONST_32 would fix it.

Change-Id: I3233cefbcd1ddea16e7de6725c2dc5ff43373916
2021-05-18 15:32:35 +03:00
Dmitry Stogov
44220c5380 Fixed incorrect stack size calculation (sizeof(zval) == 16) 2021-05-18 15:32:34 +03:00
Dmitry Stogov
0b79199500 Peephole Code Optimization:
ldr + sxtw -> ldrsw
lsl + add/sub/cmp -> add/sub/cmp (shifted register)
LOAD_64BIT_VAL + add -> ADD_SUB_64_WITH_CONST
2021-05-18 15:32:34 +03:00
Dmitry Stogov
00270c6c01 Use better code for prologue and fix code generaion for "return -1". 2021-05-18 15:32:34 +03:00
Dmitry Stogov
3014cf4add Fix compilation warnings 2021-05-18 15:32:34 +03:00
Dmitry Stogov
ee08686f7c Fixed JIT failure on Zend/tests/bug43175.phpt ZTS build, CALL VM. 2021-05-18 15:32:34 +03:00