| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
It would be better to switch this to use %union and %type annotations,
but not going to do that change for 7.3.
|
|
|
|
|
|
|
| |
Finally blocks in generators may be invoked during shutdown, in
which case we don't have a stack frame. Similar to what
zend_call_function does, we still need to rethrow these exceptions,
otherwise they will be hidden (and leak).
|
|
|
|
|
|
| |
We need to free op2 if the call construction fails.
Also remove a redundant check for !call.
|
|
|
|
|
| |
By resetting fake_scope during autoloading. We already do the same
when executing destructors.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "return" in the for loop should have been a break on the switch,
otherwise the result is just ignored... but because it prevents
evaluation of the other operand, it also violates the invariant that
everything has been constant evaluated, resulting in an assertion
failure.
The for loop isn't correct in any case though, because it's not legal
to determine the result based on just the second operand, as the
first one may have a side-effect that cannot be optimized away.
|
|
|
|
| |
Fixes oss-fuzz #19109.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
* PHP-7.2:
Fix $x = (bool)$x; for undefined with opcache
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
And `$x = !$x`
Noticed while working on GH-4912
The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:
```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
-d opcache.file_cache= -d opcache.enable_cli=1 test.php
```
|
| |
| |
| |
| |
| | |
Not the first time inheritance of shadow properties causes an issue,
thankfully this whole concept is gone in PHP 7.4.
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.2:
Add missing refcount increment
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.2:
Fixed bug #78689
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.2:
Fix bug #78752
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
NULL out the execute_data before destroying it, otherwise GC may
trigger while the execute_data is partially destroyed, resulting
in double-frees.
The handling of call stack unfreezing is a bit awkward because it's
a ZEND_API function, so we can't change the signature.
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This originally manifested as a leak in oss-fuzz #18000. The following
is a reduced test case:
<?php
[
5 => 1,
"foo" > 1,
" " => "" == 0
];
<<<BAR
$x
BAR;
Because this particular error condition did not return T_ERROR,
EG(exception) was set while performing binary operation constant
evaluation, which checks exceptions for cast failures.
Instead of adding this indirect test case, I'm adding an assertion
that the lexer has to return T_ERROR if EG(exception) is set.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.2:
Fix #78620: Out of memory error
|
| |
| |
| |
| |
| | |
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.2:
Revert "Fix #78620: Out of memory error"
|
| |
| |
| |
| |
| |
| | |
This reverts commit 8ce04df7e0108a10f7b782a28204e9384ab1129c.
Cf. <https://github.com/php/php-src/pull/4766#discussion_r330658679>.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.2:
Fix #78620: Out of memory error
|
| |
| |
| |
| |
| | |
If the integer addition in `ZEND_MM_ALIGNED_SIZE_EX` overflows, the
macro evaluates to `0`, what we should catch early.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Fixes OSS-Fuzz #17895.
|
| |
| |
| |
| | |
Otherwise these warnings will turn up twice (or more...)
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Fixes OSS-Fuzz #17721.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
By using an explicit (double) cast.
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
The properties HT may be a GC root itself, so we need to remove it.
I'm not sure this issue actually applies to PHP 7.2, but committing
it there to be safe. As seen from the test case, the handling here
is rather buggy on 7.2.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| | |
Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.
|
| |
| |
| |
| |
| | |
Since digits are allowed for identifiers, we have to cater to them as
well.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.2:
Fix #78220: Can't access OneDrive folder
|