History log of /PHP-8.1/Zend/Optimizer/sccp.c (Results 1 – 25 of 25)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2c53d631 08-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10801: Named arguments in CTE functions cause a segfault

Fixes GH-10801

Named arguments are not supported by the constant evaluation routine, in
the sense that they are i

Fix GH-10801: Named arguments in CTE functions cause a segfault

Fixes GH-10801

Named arguments are not supported by the constant evaluation routine, in
the sense that they are ignored. This causes two issues:
- It causes a crash because not all oplines belonging to the call are
removed, which results in SEND_VA{L,R} which should've been removed.
- It causes semantic issues (demonstrated in the test case).

This case never worked anyway, leading to crashes or incorrect behaviour,
so just prevent CTE of calls with named parameters for now.
We can choose to support it later, but introducing support for this in
a stable branch seems too dangerous.

This patch does not change the removal of SEND_* opcodes in remove_call
because the crash bug can't be triggered anymore with this patch as
there are no named parameters anymore and no variadic CTE functions
exist.

Closes GH-10811.

show more ...


Revision tags: php-8.1.7RC1
# c430116a 16-May-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix memory leak


# 332bd037 13-May-2022 Arnaud Le Blanc

Do not optimize out ini_get() when the entry does not exist during compilation (#8507)

The entry may exist later if dl is enabled

Fixes GH-8466

# 1f5562aa 11-Mar-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fixed memory leak


Revision tags: php-8.1.4RC1, php-8.1.3
# 34c2324f 28-Jan-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix too aggressive DCE that leads to memory leak


# 906cb52c 10-Jan-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fixed NAN handling in SCCP


Revision tags: php-8.1.2RC1
# b2939b63 24-Dec-2021 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix memory leak in SCCP


# f8f0a650 13-Dec-2021 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix incorrect optimization that leads to memory leak


# 23c5a6fd 29-Nov-2021 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
JIT: Fix exception handling when next array element is already occupied


Revision tags: php-8.1.0, php-7.3.33, php-7.3.32
# 2b71df71 28-Sep-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix type inference and SCCP with typed references


Revision tags: php-7.3.31
# 55582a25 20-Sep-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Don't replace values in unreachable code in sccp


# 3191f831 16-Sep-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Don't const evaluate increment of array in SCCP


# 54bbee96 14-Sep-2021 Nikita Popov

Check for no uses before removing result operand

It's possible for there to still be phi uses.

# fa3d603b 14-Sep-2021 Nikita Popov

Mark ASSIGN result as UNUSED in SCCP

We can't drop the ASSIGN entirely, but we should mark the result
as UNUSED. Otherwise we'll replace uses of it in operands and
will not free the

Mark ASSIGN result as UNUSED in SCCP

We can't drop the ASSIGN entirely, but we should mark the result
as UNUSED. Otherwise we'll replace uses of it in operands and
will not free the ASSIGN result value. This can happen with
non-interned strings, but possibly there's some other cases that
can trigger this as well.

show more ...

Revision tags: php-7.3.30
# 273720dc 19-Jul-2021 Nikita Popov

Add str_replace/array_unique to ct eval list

Taken from GH-5870.

# 7bbc85f1 08-Jul-2021 Kamil Tekiela

Sccp new functions for ct (#7220)

* strstr

* explode

Revision tags: php-7.3.29
# b6958bb8 31-May-2021 George Peter Banyard

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

show more ...

# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-7.3.28
# c4a749c9 20-Apr-2021 Nikita Popov

Remove php includes from sccp.c

# c457be80 13-Apr-2021 twosee

Merge branch 'PHP-8.0'

* PHP-8.0:
Fixed bug #80900


Revision tags: php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1
# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments

# 2d0e2733 18-Mar-2021 Nikita Popov

Support prototypes in call graph

Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of

Support prototypes in call graph

Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of return types from prototype methods, as
PHP 8 makes LSP violations a hard error.

Most other places are adjusted to skip calls with !is_prototype.
Maybe some of them would be fine, but ignoring them is conservative.

show more ...

# 4c088c5d 11-Feb-2021 Nikita Popov

Handle warnings during sccp function evaluation

Some upcoming changes like https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
will make it somewhat inconvenient to determine

Handle warnings during sccp function evaluation

Some upcoming changes like https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
will make it somewhat inconvenient to determine whether a given
function invocation will generate a diagnostic. Rather than trying
to exclude this in advance, call the function with diagnostics
suppressed, and check whether anything was thrown.

This adds a new EG flag that is kept specific to the SCCP use-case.
This does not use the error_cb hook as it is a (non-TLS) global,
and doesn't fully suppress error handling besides.

Test this by removing the in advance checks for implode and array_flip.

show more ...

# 27cd7a11 07-Jan-2021 Nikita Popov

Add support for string keys in array unpacking

This adds support for:

$array1 = ['a' => 1, 'b' => 2];
$array2 = ['b' => 3, 'c' => 4];
$array = [...$array1, ...$a

Add support for string keys in array unpacking

This adds support for:

$array1 = ['a' => 1, 'b' => 2];
$array2 = ['b' => 3, 'c' => 4];
$array = [...$array1, ...$array2];
// => ['a' => 1, 'b' => 3, 'c' => 4]

RFC: https://wiki.php.net/rfc/array_unpacking_string_keys

Closes GH-6584.

show more ...

# 83be073a 26-Jan-2021 Nikita Popov

Move optimizer into core

This only moves the files, adjusts the build system, exports APIs
and does minor fixups to make sure the code builds.

This does not yet try to make the

Move optimizer into core

This only moves the files, adjusts the build system, exports APIs
and does minor fixups to make sure the code builds.

This does not yet try to make the optimizer usable independently
of opcache.

Closes GH-6642.

show more ...