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

127465 Commits

Author SHA1 Message Date
Christoph M. Becker
693c8804c5 [ci skip] Merge branch 'PHP-8.1'
* PHP-8.1:
  Don't truncate subsecond precision in run-tests.php JUNIT output
2021-12-27 22:31:20 +01:00
Christoph M. Becker
b36f25ad10 [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't truncate subsecond precision in run-tests.php JUNIT output
2021-12-27 22:30:53 +01:00
Christoph M. Becker
87d9e02f01 Don't truncate subsecond precision in run-tests.php JUNIT output
When run-tests.php has been typed[1], the type of `$time` has been
chosen to be `int`.  This, however, leads to truncation, and the
somewhat relevant subsecond precision is lost.  We fix that by
changing the type to `float`, although `int|string` would be more
appropriate, but requires PHP ≥ 7.4.0.  Another option would be to
move the `number_format()` formatting into `junit_mark_test_as()`.

[1] <11274f53e7>

Closes GH-7836.
2021-12-27 22:15:33 +01:00
Dmitry Stogov
eb43f8a4f8 Eliminate more VERIFY_RETURN_TYPE instructions 2021-12-27 23:40:21 +03:00
Christoph M. Becker
1d4482908b Merge branch 'PHP-8.1'
* PHP-8.1:
  Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
2021-12-27 21:11:24 +01:00
Christoph M. Becker
d58c48d45d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
2021-12-27 21:10:40 +01:00
Christoph M. Becker
ee610947ce Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
This reverts commit 76e2a8380e.  Cf.
<76e2a8380e (r62560239)>.
2021-12-27 21:08:51 +01:00
Christoph M. Becker
a72a011054 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix zend_observer_fcall_end_all() accessing dangling pointers
2021-12-27 18:21:37 +01:00
Christoph M. Becker
d4c07df4df Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix zend_observer_fcall_end_all() accessing dangling pointers
2021-12-27 18:20:48 +01:00
Florian Sowade
76e2a8380e Fix zend_observer_fcall_end_all() accessing dangling pointers
This may happen, when the execute_data was allocated on the stack.  We
ensure that the runtime cache pointer is not NULL before dereferencing
it.

This is a partial fix for bug 81430.

Closes GH-7665.
2021-12-27 18:19:13 +01:00
Christoph M. Becker
71b55d7dd8 [ci skip] supportedOs Id for Windows 10 and 11 are the same
Cf. <https://docs.microsoft.com/en-us/windows/win32/sysinfo/targeting-your-application-at-windows-8-1>.
2021-12-27 15:18:47 +01:00
Christoph M. Becker
383bdbce64 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-7815: php_uname doesn't recognise latest Windows versions
2021-12-27 15:09:02 +01:00
David Warner
f82593d597 Fix GH-7815: php_uname doesn't recognise latest Windows versions
We check `dwBuildNumber` to determine newer Windows versions.

Closes GH-7816.
2021-12-27 15:08:11 +01:00
Dmitry Stogov
a066b809de Skip abstract methods 2021-12-27 15:28:46 +03:00
Dmitry Stogov
2759e6bc69 Fixed assertion when check "instanceof" on unlinked class 2021-12-27 12:02:13 +03:00
Christoph M. Becker
124ac49325 [ci skip] Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bug40228*.phpt conflict
2021-12-26 23:28:59 +01:00
Christoph M. Becker
187e011710 [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug40228*.phpt conflict
2021-12-26 23:28:29 +01:00
Christoph M. Becker
7f0a1e2f2d Fix bug40228*.phpt conflict
Both tests use the same directory structure; we avoid that by
extracting to separate subdirectories.

Closes GH-7831.
2021-12-26 23:23:56 +01:00
Christoph M. Becker
5a3b0da19d Merge branch 'PHP-8.1'
* PHP-8.1:
  Mark curl tests using http2.golang.org as XFAIL
2021-12-26 22:30:16 +01:00
Christoph M. Becker
710dc03399 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Mark curl tests using http2.golang.org as XFAIL
2021-12-26 22:29:17 +01:00
Christoph M. Becker
5005445994 Mark curl tests using http2.golang.org as XFAIL
http2.golang.org/serverpush has been retired[1], so we need to come up
with an alternative.  Until then, we mark the relevant tests as XFAIL
(although bug77535.phpt passes, what might be an indication that the
test needs further revision).  To avoid waiting for the timeout, we
also unconditionally skip these tests for now.

[1] <https://github.com/golang/go/issues/49301>

Closes GH-7829.
2021-12-26 22:27:15 +01:00
Alex Dowad
53ffba967c Implement fast text conversion interface for CP5022{0,1,2} 2021-12-26 22:19:51 +02:00
Alex Dowad
01afd9f141 Implement fast text conversion interface for JIS 2021-12-26 22:19:51 +02:00
Alex Dowad
cb4626c5b2 Implement fast text conversion interface for GB18030 2021-12-26 22:19:51 +02:00
Alex Dowad
3e8088dc80 Implement fast text conversion interface for EUC-JP-MS 2021-12-26 22:19:51 +02:00
Alex Dowad
e5af94b74f Implement fast text conversion interface for CP51932 2021-12-26 22:19:51 +02:00
Alex Dowad
6ef1b35223 Implement fast text conversion interface for EUC-CN 2021-12-26 22:19:51 +02:00
Alex Dowad
9bd08a97d9 Implement fast text conversion interface for EUC-TW 2021-12-26 22:19:51 +02:00
Alex Dowad
661a10160b Implement fast text conversion interface for CP936 2021-12-26 22:19:51 +02:00
Alex Dowad
20555371d5 Implement fast text conversion interface for CP932 2021-12-26 22:19:51 +02:00
Alex Dowad
43bb97c539 Implement fast text conversion interface for EUC-KR 2021-12-26 22:19:51 +02:00
Alex Dowad
c0936d48b0 Implement fast text conversion interface for UHC 2021-12-26 22:19:51 +02:00
Alex Dowad
40809cb19f Implement fast text conversion interface for HZ 2021-12-26 22:19:51 +02:00
Alex Dowad
da58d42d94 Implement fast text conversion interface for CP950 2021-12-26 22:19:51 +02:00
Alex Dowad
eac50a360f Implement fast text conversion interface for Big5 2021-12-26 22:19:51 +02:00
Christoph M. Becker
057737c92f Merge branch 'PHP-8.1'
* PHP-8.1:
  Prevent strict interpretation of tentative definition
2021-12-26 16:43:34 +01:00
Christoph M. Becker
0cd1741004 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Prevent strict interpretation of tentative definition
2021-12-26 16:42:33 +01:00
Christoph M. Becker
e76ddbd2f6 Prevent strict interpretation of tentative definition
This header declaration is never supposed to be interpreted as
definition; otherwise, the handlers are not properly initialized, what
happens, for instance, with ASan instrumented MSVC builds.

Closes GH-7827.
2021-12-26 16:41:25 +01:00
Nikita Popov
e45653c089 Make sure SCCP can evaluate all functions pass1 can
Move evaluation of ini_get() into eval_special_func_call() and
use this helper both in pass1 and sccp.
2021-12-26 15:40:35 +01:00
Nikita Popov
1050edaef8 Extract special function evaluation from pass1
Pass1 handles a number of special functions that can be evaluated
under some circumstances. Move the core logic into a separate
helper, as I believe that SCCP should reuse this.
2021-12-26 15:40:35 +01:00
Christoph M. Becker
77b54248c8 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file
2021-12-26 12:59:38 +01:00
Christoph M. Becker
a6ddd1a14d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file
2021-12-26 12:59:06 +01:00
Christoph M. Becker
fd3fc5c193 Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file
Like `hash_file()`, `hash_hmac_file()` expects a filename, and not some
string data.  Fixing this now, constitutes a (hopefully small) BC break
though.

Closes GH-7828.
2021-12-26 12:55:53 +01:00
Christoph M. Becker
c5c66bd8ec Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix chunk_split_variation*_32bit.phpt for Windows
2021-12-26 12:07:44 +01:00
Christoph M. Becker
9e4437f8c6 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix chunk_split_variation*_32bit.phpt for Windows
2021-12-26 12:07:07 +01:00
Christoph M. Becker
b4ba65dd9d Fix chunk_split_variation*_32bit.phpt for Windows
Both tests fail on Windows for slightly different reasons, what appears
to be legit, and as such we fix the test expectations.

Closes GH-7830.
2021-12-26 12:05:52 +01:00
Nikita Popov
c4334fc616 Remove special chr/count handling in sccp function evaluation
These can be handled by the generic code. Worth noting that count
will usually go through ZEND_COUNT, and chr on constants is
evaluated in the compiler, so these are not particularly compile-time
sensitive either.
2021-12-26 09:55:18 +01:00
Nikita Popov
924e875651 Minor code cleanup in pass1
Move literal destruction into helper and use a common result
variable to make code more compact.
2021-12-26 09:48:06 +01:00
Nikita Popov
206d80e11a Reuse get_class_entry_from_op1() helper
Export and reuse this helper in places that fetch a class entry
from op1.
2021-12-25 22:18:50 +01:00
Nikita Popov
2cf93032ee Sink op_array scope case into get_class_entry()
This handles references to the current class through its name
rather than self (and for cases where is is not linked yet and
thus not covered by the context lookup). Rather than handling this
only for FETCH_CLASS_CONSTANT optimization, integrate this into
the generic get_class_entry() utility.
2021-12-25 21:51:29 +01:00