1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 19:52:20 +02:00
Commit Graph

124282 Commits

Author SHA1 Message Date
Máté Kocsis
bf42cf5ae0 Merge branch 'PHP-8.0'
* Fix imagesetclip() parameter names
2021-05-23 19:41:25 +02:00
Máté Kocsis
25e24715d7 Fix imagesetclip() parameter names
Closes GH-7035
2021-05-23 19:40:12 +02:00
Máté Kocsis
78ecd4a5f0 Declare tentative return types for ext/reflection
Closes GH-7011
2021-05-23 15:59:57 +02:00
Christoph M. Becker
d61d21ad57 Merge branch 'PHP-8.0'
* PHP-8.0:
  SimpleXMLElement::addAttribute() is a void function
2021-05-22 22:31:51 +02:00
Christoph M. Becker
24d9527c75 SimpleXMLElement::addAttribute() is a void function
Closes GH-7033.
2021-05-22 22:28:34 +02:00
Christoph M. Becker
dff0798552 Merge branch 'PHP-8.0'
* PHP-8.0:
  Update version in php_version.h as well
2021-05-22 15:48:13 +02:00
Christoph M. Becker
dcdac65dab Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Update version in php_version.h as well
2021-05-22 15:47:35 +02:00
Christoph M. Becker
59522ba968 Update version in php_version.h as well
The version there is automatically updated during `./configure`, but
not on Windows.
2021-05-22 15:42:57 +02:00
Christoph M. Becker
a375d54785 Migrate skip checks to --EXTENSIONS-- for ext/gd
Cf. PR #6787.

Closes GH-6994.
2021-05-22 15:38:51 +02:00
Nikita Popov
a0c44fbaf1 Always define valgrind replacement symbol for zend_string_equal_val
The required symbol name seems to be very stable, so we can hardcode
a fallback. This avoids many false positives when PHP is not built
against valgrind.
2021-05-21 21:00:34 +02:00
Joe Watkins
1bfaba4134 Merge branch 'master' of github.com:php/php-src
* 'master' of github.com:php/php-src:
  Fix upload_2G test
2021-05-21 16:07:45 +02:00
Joe Watkins
4d883a0eba note in upgrading for b227a72285 2021-05-21 16:05:56 +02:00
Nikita Popov
1af891306a Fix upload_2G test
Include the new full_path key. This test is skipped on CI but
fails locally.
2021-05-21 16:02:40 +02:00
Joe Watkins
b227a72285 ReflectionFunctionAbstract::getClosureUsedVariables
Make a distinction at compile time between bind types for static
  variables

  getStaticVariables remains unchanged

  Fixes #80071
2021-05-21 15:25:35 +02:00
Dmitry Stogov
77ce2537f7 Merge branch 'PHP-8.0'
* PHP-8.0:
  Disable ASSIGN + SEND_VAL fusion for cases when destroying of old value may throw an exception.
2021-05-21 13:38:50 +03:00
Dmitry Stogov
11a7310b49 Disable ASSIGN + SEND_VAL fusion for cases when destroying of old value may throw an exception. 2021-05-21 13:36:58 +03:00
David CARLIER
90b843beb6 Add FreeBSD to CI (#6974)
This is using Cirrus, as none of the CI providers we already use support FreeBSD.
2021-05-21 12:00:46 +02:00
Hao Sun
3ce26d80b7 JIT/AArch64: [macos] Fix arguments to variadic function (#7023)
zend_throw_error() and zend_error() are variadic functions. In Linux,
arguments are passed in registers, whereas they must be put on stack in
Macos [1][2].

In this patch:
1. preprocessor macro "__APPLE__" is used to distinguish the OS.
2. the third argument "CARG3" is the only variadic argument and put on
stack.
3. the invocation of zend_error() is converted back to regular call in
zend_jit_undefined_offset_stub() and zend_jit_undefined_index_stub().

With this patch, all ~4k test cases can pass for "nonZTS+CALL"
functional/tracing JIT with Macos Apple Silicion.

[1]
https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Overview
[2] https://github.com/below/HelloSilicon#listing-9-1

Change-Id: I49bc3233fc253ad3e77e8664464ff3e830dcd183
2021-05-21 17:59:15 +08:00
Nikita Popov
b849aa6494 Merge branch 'PHP-8.0'
* PHP-8.0:
  Pass flags to #[Attribute] on internal attributes
2021-05-21 11:42:11 +02:00
Nikita Popov
db6e60e744 Pass flags to #[Attribute] on internal attributes
While the specified restriction was checked, the #[Attribute]
attribute did not specify the flags parameter, so that Reflection
returned incorrect information.

In particular, Attribute itself has a CLASS target, not an ALL
target.
2021-05-21 11:40:23 +02:00
Nikita Popov
b97a080034 Remove special UNREACHABLE_FREE handling in block pass
This results in an assertion failure when running under -e,
because there is an additional EXT_STMT + NOP before the FREE.
I don't think there's a strong reason to handle UNREACHABLE_FREE
specially here (it's only important that we *do* handle it), so
I'm dropping the code rather than adjusting it to scan over
certain opcodes.
2021-05-21 11:10:32 +02:00
Nikita Popov
9f263411eb XFAIL two intl tests on FreeBSD
These tests fail with the following diff:

========DIFF========
     date:  Tuesday, July 7, 2009 8:41:13 PM EDT
002+ msgf:  Wednesday, July 8, 2009 12:41:13 AM utc
002- msgf:  Tuesday, July 7, 2009 8:41:13 PM usnyc
========DONE========
FAIL Bug #58756: w.r.t MessageFormatter [ext/intl/tests/bug58756_MessageFormatter_variant2.phpt]

========DIFF========
001+ quinta-feira, 17 de maio de 2012 4:35:36 da tarde utc
001- quinta-feira, 17 de maio de 2012 5:35:36 da tarde ptlis
========DONE========
FAIL MessageFormat accepts IntlCalendar args [ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt]

That is, it appears that the timezone does not get applied. I don't
know why this happens, and don't want to spend more time trying to
figure this out.
2021-05-21 10:36:33 +02:00
Dmitry Stogov
0b4706819b Fix register save/restore around calls. (This fixes ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202 without PROFITABILITY_CHECKS) 2021-05-21 11:12:22 +03:00
Dmitry Stogov
e9d171805a Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix register save/restore around calls. (This fixes ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202 without PROFITABILITY_CHECKS)
2021-05-21 11:10:20 +03:00
Dmitry Stogov
025c0763e7 Fix register save/restore around calls. (This fixes
ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202
without PROFITABILITY_CHECKS)
2021-05-21 11:08:56 +03:00
Derick Rethans
b624473b3e Merge branch 'PHP-8.0' 2021-05-21 09:03:31 +01:00
Derick Rethans
2b4acf0cee Merge branch 'detect_musl_and_turn_off_tls_attribute' into PHP-8.0 2021-05-21 09:03:23 +01:00
Derick Rethans
804420b011 Detect musl libc to not set tls_model attribute on that platform
This fixes:
``_tsrm_ls_cache: initial-exec TLS resolves to dynamic definition``
in shared extensions.
2021-05-21 09:02:46 +01:00
Dmitry Stogov
ab1827f3d4 Merge branch 'PHP-8.0'
* PHP-8.0:
  Add missing undefined variable warning an result initialization. (This fixes Zend/tests/bug78531.phpt without PROFITABILITY_CHECKS).
2021-05-21 10:04:38 +03:00
Dmitry Stogov
bf21261c63 Add missing undefined variable warning an result initialization.
(This fixes Zend/tests/bug78531.phpt without PROFITABILITY_CHECKS).
2021-05-21 10:03:00 +03:00
Hao Sun
b8a29319a7 JIT/AArch64: Fix typo in commit dc0e259 (#7021)
PHP JIT/AArch64 building is broken. Instruction "beq" should be used.

Change-Id: I16c00f87bafb3a565141e1e02c9e15653f39a276
2021-05-21 14:06:33 +08:00
Dmitry Stogov
6881a002d4 Merge branch 'PHP-8.0'
* PHP-8.0:
  Don't assign to string offset after exception (This fixes Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:49:44 +03:00
Dmitry Stogov
db309b2e4b Don't assign to string offset after exception (This fixes
Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:48:24 +03:00
Dmitry Stogov
dc0e259154 Merge branch 'PHP-8.0'
* PHP-8.0:
  JIT: Fixed incorrect condition (this leaded to Zend/tests/type_declarations/typed_properties_083.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:02:46 +03:00
Dmitry Stogov
cce0cc8836 JIT: Fixed incorrect condition (this leaded to
Zend/tests/type_declarations/typed_properties_083.phpt failure without
PROFITABILITY_CHECKS)
2021-05-21 00:01:00 +03:00
Dmitry Stogov
cb376d8f61 Fixed Zend/tests/type_declarations/union_types/incdec_prop.phpt failure
masked by PROFITABILITY_CHECKS.
2021-05-20 22:52:47 +03:00
Dmitry Stogov
6be0278332 Fixed 32-bit x86 disassembler 2021-05-20 20:17:50 +03:00
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
a9d2196913.

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