Dmitry Stogov
8fbeebec34
Fixed typo
2021-07-22 16:14:26 +03:00
Dmitry Stogov
17b5fe13e2
Added test
2021-07-21 19:29:59 +03:00
Dmitry Stogov
053c56f52e
Fixed bug #81226 (Integer overflow behavior is different with JIT enabled)
2021-07-21 19:28:43 +03:00
Joe Watkins
0ba6ddefd5
retry ldap setup a few times in CI
2021-07-21 18:06:13 +02:00
Christoph M. Becker
f03e7c845e
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #74960 : Heap buffer overflow via str_repeat
2021-07-21 15:33:17 +02:00
Christoph M. Becker
760ff841a1
Fix #74960 : Heap buffer overflow via str_repeat
...
Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow, so callers may need to
check that explicitly. To make that easy in a portable way, we
introduce `ZSTR_MAX_LEN`.
Closes GH-7294.
2021-07-21 15:31:37 +02:00
Dmitry Stogov
a9991fbf28
Fixed Bug #80959 (infinite loop in building cfg during JIT compilation)
2021-07-21 14:32:44 +03:00
Nikita Popov
a0893865b3
dom_import_simplexml() cannot return null
2021-07-21 11:13:37 +02:00
Dmitry Stogov
02acc5ad3b
Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT)
2021-07-20 22:14:32 +03:00
Nikita Popov
bd2cd2617b
Create interned strings for internal union types
...
Just like for non-union types. These may be returned to userland
via reflection, and as such need to be interned.
2021-07-20 16:24:06 +02:00
Nikita Popov
9726bc6977
Duplicate possibly persistent string in phar metadata clone
2021-07-20 16:24:00 +02:00
Nikita Popov
b0d4d6ebb4
Create persistent interned string for password algos
...
These strings are returned to userland by password_algos(),
which violates thread-safety invariants. Create persistent
interned strings for them instead.
2021-07-20 15:13:50 +02:00
Nikita Popov
051ff33660
Fix bug #81272 : Fix func info for functions returning EMPTY_ARRAY
...
The empty array has refcount > 1, so we should indicate this in
func info. In most cases this renders the func info redundant,
so drop it entirely.
2021-07-20 14:40:17 +02:00
Christoph M. Becker
18abfcb306
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Revert "Fix #79908 : json_encode encodes negative zero as int"
2021-07-20 00:28:27 +02:00
Christoph M. Becker
2d2c001ca5
Revert "Fix #79908 : json_encode encodes negative zero as int"
...
This reverts commit 717f1ed5e4 .
2021-07-20 00:25:50 +02:00
Christoph M. Becker
ef77d3c89f
Fix #81206 : Multiple PHP processes crash with JIT enabled
...
We need to avoid resetting the JIT for all SAPIs, but we need to
initialize the JIT handlers even when only reattaching on Windows.
Closes GH-7208.
2021-07-19 23:45:37 +02:00
Derick Rethans
9d0fb10823
Merge branch 'PHP-7.4' into PHP-8.0
2021-07-19 15:08:09 +01:00
Derick Rethans
26b1572d37
Move date timezone cache destruction to post deactivate
...
Some extensions try to use the date features in their own shutdown,
most notably some logging functions. Because of that, move the
cache tear down until after these resources have been cleaned up.
2021-07-19 15:07:01 +01:00
Dmitry Stogov
15abbea5e7
Avoid ASAN integer overflow warnings
2021-07-19 14:53:23 +03:00
Hao Sun
c5d93aeee9
Fixed incorrec immediate encoding when using LEA optimization
2021-07-19 14:51:08 +03:00
Dmitry Stogov
c0e4932816
Fixed bug #81249 (Intermittent property assignment failure with JIT enabled)
2021-07-19 12:11:09 +03:00
Dmitry Stogov
ee981619ce
Skip test on 32-bit system
2021-07-19 10:49:43 +03:00
Dmitry Stogov
9cd437138e
Fixed bug #81225 (Wrong result with pow operator with JIT enabled)
2021-07-19 10:39:52 +03:00
Christoph M. Becker
9fbcaa57aa
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #78238 : BCMath returns "-0"
2021-07-16 15:56:15 +02:00
Christoph M. Becker
bcb89c75ec
Fix #78238 : BCMath returns "-0"
...
There is no negative zero in the decimal system, so we must suppress
the sign.
Closes GH-7250.
2021-07-16 15:54:24 +02:00
Nikita Popov
12a858ac95
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix bug #81265 : getimagesize returns 0 for 256px ICO images
2021-07-16 10:07:26 +02:00
George Dietrich
8f97f82e35
Fix bug #81265 : getimagesize returns 0 for 256px ICO images
...
Set ICO height/width to 256 if 0.
2021-07-16 10:05:58 +02:00
Christoph M. Becker
bb4dbbc150
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #80849 : HTTP Status header truncation
2021-07-15 19:13:58 +02:00
Christoph M. Becker
a054ef2aad
Fix #80849 : HTTP Status header truncation
...
While truncating the contents of a header is okay, we must never omit
the trailing CRLF.
Closes GH-7238.
2021-07-15 19:10:53 +02:00
Máté Kocsis
fc6656e0ac
Fix some more ext/spl return types
...
Closes GH-7242
2021-07-15 16:40:29 +02:00
Christoph M. Becker
c6b7f6c39f
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #72595 : php_output_handler_append illegal write access
2021-07-15 15:29:48 +02:00
Christoph M. Becker
a942cf5b02
Fix #72595 : php_output_handler_append illegal write access
...
We must make sure that `handler->buffer.size + grow_max` does not
overflow, so we're using `safe_erealloc()` instead.
Closes GH-7241.
2021-07-15 15:26:42 +02:00
Nikita Popov
b9ae73eee9
Fix RecursiveIteratorIterator segfault for invalid aggregate
...
The code was assuming that the returned value is an object.
Reuse the logic from IteratorIterator.
2021-07-15 13:11:28 +02:00
Christoph M. Becker
c0a1ef3e32
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #72146 : Integer overflow on substr_replace
2021-07-15 12:56:12 +02:00
Christoph M. Becker
33f8dfb15a
Fix #72146 : Integer overflow on substr_replace
...
Adding two `zend_long`s may overflow, and casting `size_t` to
`zend_long` may truncate; we can avoid this here by enforcing unsigned
arithmetic.
Closes GH-7240.
2021-07-15 12:54:28 +02:00
Nikita Popov
567e53ea58
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Undef slot before destroying in unset_property
2021-07-15 09:32:26 +02:00
Nikita Popov
ebd3a21002
Undef slot before destroying in unset_property
...
We need to make sure that destructors can't access the partially
destroyed property. Do the same we do in HTs.
Fixes oss-fuzz #36205 .
2021-07-15 09:31:19 +02:00
Nikita Popov
6fd880890c
Add exception check to zend_jit_fetch_obj_w_slow()
...
This ports 247105ae1a to the JIT
implementation. The issue doesn't trigger on the original test
case with JIT, but I ran into a case that does trigger with JIT
once we have typed properties.
2021-07-14 16:56:12 +02:00
Nikita Popov
982c833acd
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Drop incorrect cache_slot optimization for typed properties
2021-07-14 15:10:11 +02:00
Nikita Popov
ba8bcf3992
Drop incorrect cache_slot optimization for typed properties
...
For a particular assignment, a non-coerced constant assignment
value will remain valid. However, opcache merges cache slots for
all identical property references, which means that this
optimization also disables property type checks for all other
operands on the property that occur in the same functions.
This could be addressed by blocking cache slot merging in opcache,
but I prefer dropping it entirely instead. It does not seem
important enough to warrant doing that.
2021-07-14 15:08:33 +02:00
Máté Kocsis
d618ed0a2d
Fix some return types in ext/spl
...
Closes GH-7237
2021-07-14 12:33:14 +02:00
Nikita Popov
2afbacc16d
Backport some intl stub changes from master
...
While we're not sure under what circumstances they would fail,
they're fallible on the implementation level.
2021-07-14 11:55:12 +02:00
Derick Rethans
88d6fbe05e
Merge branch 'PHP-7.4' into PHP-8.0
2021-07-13 17:21:45 +01:00
Derick Rethans
f40dcedb48
Update NEWS for 7.4.22
2021-07-13 17:21:34 +01:00
Sara Golemon
7dc35ac8a7
Bump to 8.0.10
2021-07-13 14:10:35 +00:00
Christoph M. Becker
1ba190bdb3
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #79908 : json_encode encodes negative zero as int
2021-07-13 15:32:32 +02:00
Christoph M. Becker
717f1ed5e4
Fix #79908 : json_encode encodes negative zero as int
...
Encoding a negative zero as `-0` is likely to loose the sign when
decoding (at least it does with `json_decode()`). Therefore, we encode
it as if `JSON_PRESERVE_ZERO_FRACTION` was specified, i.e. as `-0.0`.
Closes GH-7234.
2021-07-13 15:31:07 +02:00
Christoph M. Becker
1631b96b4b
exit_status is no longer a true global
2021-07-12 23:39:10 +02:00
Christoph M. Becker
0c0ecf0470
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #73226 : --r[fcez] always return zero exit code
2021-07-12 23:12:19 +02:00
Christoph M. Becker
9db3eda2cb
Fix #73226 : --r[fcez] always return zero exit code
...
This makes the behavior consistent with `--ri`, and is likely useful
for scripting.
Closes GH-7221.
2021-07-12 23:09:28 +02:00