History log of /php-src/Zend/Optimizer/block_pass.c (Results 1 – 25 of 27)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 631bc816 06-Feb-2024 Ilija Tovilo

Implement stackless internal function calls

Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-12461


# 19dfe05f 01-Nov-2023 Dmitry Stogov

Fixed inorrect QM_ASSIGN elimination

Fixes oss-fuzz #63771


# b5f8a727 31-Jul-2023 Dmitry Stogov

Fixed incorrect QM_ASSIGN elimination

Fixes OSS Fuzz #60895


# 9fc0eab4 24-Jul-2023 Dmitry Stogov

Fixed incorrect QM_ASSIGN elimination

Fixes OSS Fuzz #60735


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3
# 0b1d750d 11-Aug-2022 Ilija Tovilo

Allow arbitrary expressions in static variable initializer

Closes GH-9301


# 5cad1a71 16-May-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11245 (In some specific cases SWITCH with one default statement will cause segfault)

The block optimizer pass allows the use of sources of the preceding
block if the block is a fo

Fix GH-11245 (In some specific cases SWITCH with one default statement will cause segfault)

The block optimizer pass allows the use of sources of the preceding
block if the block is a follower and not a target. This causes issues
when trying to remove FREE instructions: if the source is not in the
block of the FREE, then the FREE and source are still removed. Therefore
the other successor blocks, which must consume or FREE the temporary,
will still contain the FREE opline. This opline will now refer to a
temporary that doesn't exist anymore, which most of the time results in
a crash. For these kind of non-local scenarios, we'll let the SSA
based optimizations handle those cases.

Closes GH-11251.

show more ...


# 1f5d9534 27-Mar-2023 Dmitry Stogov

Fix incorrect optimization

Fixes oss-fuzz #57482


# d5c649b3 23-Feb-2023 Max Kellermann

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleadi

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleading, so let's use a
C99 integer instead.

On all architectures currently supported by PHP, `zend_uchar` and
`uint8_t` are identical. This change is only about code readability.

show more ...


# dfe9c2af 15-Jan-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix incorrect comparison in block optimization pass

We're in the case of ZEND_JMPZ_EX or ZEND_JMPNZ_EX. The opcode gets
overwritten and only after the overwriting gets checked if we're i

Fix incorrect comparison in block optimization pass

We're in the case of ZEND_JMPZ_EX or ZEND_JMPNZ_EX. The opcode gets
overwritten and only after the overwriting gets checked if we're in a
JMPZ or JMPNZ case. This results in a wrong optimization.

Close GH-10329

show more ...


# 04645242 26-Dec-2022 Dmitry Stogov

Fix memory leak because of incorrect optimization

Fixes oss-fuzz #54488


Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1
# 3d4a55fe 20-Jun-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix memory leak


# ee17296e 20-Jun-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix memory leak


Revision tags: php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17
# df14a078 11-Mar-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Optimizer: Fix inorrect constant substitution in FETCH_LIST_R


# 770a544a 11-Mar-2022 Dmitry Stogov

Optimizer: Fix inorrect constant substitution in FETCH_LIST_R

Fixes oss-fuzz #45429

Revision tags: php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1
# 4543cd32 30-Dec-2021 Nikita Popov

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negat

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negative effect. It also adds additional
complexity for optimizations.

Drop JMPZNZ in favor of JMPZ+JMP or JMPNZ+JMP.

Closes GH-7857.

show more ...

# 0698bf79 30-Dec-2021 Nikita Popov

Add helper for convertion to CHECK_VAR/FREE/NOP

This is a recurring pattern whenever an instruction with an
operand is deleted.

Revision tags: php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1
# 43b3cf11 06-Oct-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Don't start new block after loop free


# f455894b 06-Oct-2021 Nikita Popov

Don't start new block after loop free

This reverts the change from 493c91c7429ee4552d2b80a2648271e2ba97f15c.
Starting a new block means that in the common case where the loop var
fre

Don't start new block after loop free

This reverts the change from 493c91c7429ee4552d2b80a2648271e2ba97f15c.
Starting a new block means that in the common case where the loop var
free is not unreachable, we'll always merge back the block.

Instead fix the original problem by explicitly removing instructions
apart from the loop var free in block pass.

show more ...

Revision tags: php-7.4.25RC1, php-8.1.0RC3
# c19977d0 27-Sep-2021 Nikita Popov

Fix delayed early binding with optimization

It's possible for delayed early binding opcodes to get optimized
away if they are "unreachable". However, we still need to attempt
early b

Fix delayed early binding with optimization

It's possible for delayed early binding opcodes to get optimized
away if they are "unreachable". However, we still need to attempt
early binding for them. (In some cases we also corrupt the early
binding list outright during optimization, which is how I got here.)

Fix this by storing information about delayed early binding
independently of DECLARE_CLASS_DELAYED opcodes, so early binding is
performed even after the opcode has been dropped.

show more ...

Revision tags: php-8.0.11, php-7.4.24, php-7.3.31
# 50378666 20-Sep-2021 George Peter Banyard

Voidify zend_build_cfg()

It always returned SUCCESS

# 53d5420d 20-Sep-2021 George Peter Banyard

Use more appropriate types in Optimizer

Mainly using zend_result and bool instead of int

Revision tags: php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20
# b97a0800 21-May-2021 Nikita Popov

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 do

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.

show more ...

Revision tags: php-8.0.7RC1, php-7.4.20RC1
# 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-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5
# b82242a8 20-Apr-2021 Nikita Popov

Remove unnecessary php.h includes from Zend/

The Zend/ directory really shouldn't be including php headers.
These particular includes are plain unnecessary.

Revision tags: php-8.0.5RC1, php-7.4.18RC1
# 462da6e0 31-Mar-2021 Josh Soref

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.

show more ...

12