History log of /php-src/Zend/Optimizer/zend_func_info.c (Results 1 – 25 of 64)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# eb1cdb5b 01-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix opline argument for getting the function info for range()

Short-lived regression from 00c6d538ab333334ba98a7f44b936530dda37e05,
where in one of its commits (that was squashed) not al

Fix opline argument for getting the function info for range()

Short-lived regression from 00c6d538ab333334ba98a7f44b936530dda37e05,
where in one of its commits (that was squashed) not all changes were
reverted correctly.

show more ...


# 00c6d538 01-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c (#13846)

* Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c

ssa_op can be NULL in func

Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c (#13846)

* Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c

ssa_op can be NULL in function JIT. Doing pointer arithmetic on a NULL
pointer is undefined behaviour. Undefined behaviour can be dangerous
because the optimizer may assume then that the variable is not actually
NULL.

To solve this:
1. Add ADVANCE_SSA_OP() to safely add an offset to ssa_op in zend_jit.c
2. For inference, add an extra offset argument to the helper functions.

To reproduce this, use Clang (not GCC) on a test like
sapi/cli/tests/gh12363.phpt (or other tests also work).

* Remove -fno-sanitize=pointer-overflow flag from CI

* Fix NULL pointer offsets added to the stack_map

* Fix an offset add on a potentially NULL ssa->ops

* Fix NULL pointer arithmetic in zend_range_info()

* Address review comments

show more ...


# 631bc816 06-Feb-2024 Ilija Tovilo

Implement stackless internal function calls

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

Closes GH-12461


# 42cbace1 16-Jan-2024 Ilija Tovilo

Fix range inference since "proper-range-semantics" RFC

* Arrays returned from range are never empty
* When step is a double value representable by a long, it is coerced implicitly.

Fix range inference since "proper-range-semantics" RFC

* Arrays returned from range are never empty
* When step is a double value representable by a long, it is coerced implicitly.
As such, passing a double step no longer guarantees that the result is a
non-int array.

Closes GH-13166

show more ...


# 1c95e227 02-Nov-2023 Dmitry Stogov

Fixed HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag (#12591)

* Fixed HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag

This fixes GH-12527

* typo


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, 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, 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
# 701e10c3 15-Apr-2022 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Don't set ce for by-ref return type


# b0ab5d0f 15-Apr-2022 Nikita Popov

Don't set ce for by-ref return type

For the case where we upgrade a prototype to a possible by-ref
return from an inheriting method.

Revision tags: 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, php-8.1.4RC1, php-8.0.17RC1
# 3be34c3b 22-Feb-2022 Christoph M. Becker

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix GH-8074: Wrong type inference of range() result


# 7ea3b193 22-Feb-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix GH-8074: Wrong type inference of range() result


Revision tags: 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, 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
# 9ecec661 11-Oct-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Preserve key/value type invariant in range() type inference


# f0cf9992 11-Oct-2021 Nikita Popov

Preserve key/value type invariant in range() type inference

Don't set PACKED key type if no value type is set.

Fixes oss-fuzz 6718410667458560.

Revision tags: php-8.0.12RC1
# c84c07e2 06-Oct-2021 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fixed type inference that may cause JIT failure


# 0b5d62e3 06-Oct-2021 Dmitry Stogov

Fixed type inference that may cause JIT failure

PHP allows to override a method that returns non-reference with a method
that returns a reference. This mean that we cannot use prototypes

Fixed type inference that may cause JIT failure

PHP allows to override a method that returns non-reference with a method
that returns a reference. This mean that we cannot use prototypes to
predict return types of a child functions.

show more ...

Revision tags: php-7.4.25RC1, php-8.1.0RC3, php-8.0.11
# 2067388f 21-Sep-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix range() return type inference for undef operand


# a846547e 21-Sep-2021 Nikita Popov

Fix range() return type inference for undef operand

This results in a long range.

Revision tags: php-7.4.24, php-7.3.31
# 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
# 9b170a41 31-Aug-2021 Nikita Popov

Mark private function as static

# c19e4b99 30-Aug-2021 Máté Kocsis

Generate optimizer func info from stubs for ext/standard - part 3 (#7426)

# 8e6e9838 30-Aug-2021 Máté Kocsis

Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416)

# b49d340f 27-Aug-2021 Máté Kocsis

Generate optimizer func info from stubs for ext/standard - part 2 (#7414)

# 3f0b5863 27-Aug-2021 Máté Kocsis

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix a few func info


# 51a504c8 27-Aug-2021 Nikita Popov

Avoid string copy in get_cfg_var()

basic_functions.c already has a macro for returning an ini
value to userland, so make use of it for get_cfg_var() as well,
after generalizing it to

Avoid string copy in get_cfg_var()

basic_functions.c already has a macro for returning an ini
value to userland, so make use of it for get_cfg_var() as well,
after generalizing it to not write to return_value in particular.

show more ...

# 1ce81b6b 27-Aug-2021 Máté Kocsis

Generate optimizer func info from stubs for ext/standard - part 1 (#7413)

# 8712fb5f 27-Aug-2021 Máté Kocsis

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix func info for str_replace() and str_ireplace()


# 7157a2a9 27-Aug-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Remove incorrect refcount info for addcslashes()


123