History log of /PHP-7.4/Zend/zend_operators.c (Results 1 – 25 of 590)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# f3c45c17 17-Aug-2021 Christoph M. Becker

Revert "Fix #73122: Integer Overflow when concatenating strings"

This reverts commit f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d, which has
been accidentially pushed.


# f1ce8d5f 17-Aug-2021 Christoph M. Becker

Fix #73122: Integer Overflow when concatenating strings

We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare cas

Fix #73122: Integer Overflow when concatenating strings

We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away.

show more ...


# 760ff841 21-Jul-2021 Christoph M. Becker

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

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.

show more ...


# 3c4dd73c 12-Oct-2020 Nikita Popov

Detect self-addition of array more accurately

While the zvals may be different, they may still point to the
same array.

Fixes oss-fuzz #26245.


# cd2afd99 31-Aug-2020 Nikita Popov

Fix leak on assign concat of array and empty string


Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5
# 184ba0c9 24-Oct-2019 Nikita Popov

Remove recursive check from instanceof_interface

Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.

Only e

Remove recursive check from instanceof_interface

Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.

Only exception are instanceof checks performed during inheritance
itself. However, we already have unlinked_instanceof for this
purpose, it just needs to be taught to handle this case.

Closes GH-4857.

show more ...


# c63a0e00 24-Oct-2019 Nikita Popov

Optimize instanceof_class/interface

instanceof_class does not need to check for a NULL pointer in the
first iteration -- passing NULL to this function is illegal.

instanceof_int

Optimize instanceof_class/interface

instanceof_class does not need to check for a NULL pointer in the
first iteration -- passing NULL to this function is illegal.

instanceof_interface does not need to use instanceof_class(), it
only has to check whether the CEs match exactly. There is no way
for an interface to appear inside "parent", it will always be in
"interfaces" only.

show more ...


# 435f2691 24-Oct-2019 Nikita Popov

Clean up and clarify instanceof_function_ex()

The instanceof_interface_only() function was dead code (always
returned zero).

Clarify that the last parameter indicates whether th

Clean up and clarify instanceof_function_ex()

The instanceof_interface_only() function was dead code (always
returned zero).

Clarify that the last parameter indicates whether the passed CE
is interface or class and rewrite the code in terms of assertions.

show more ...


Revision tags: php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4
# 21148679 08-Oct-2019 Nikita Popov

Handle "non well formed" exception during ZPP

Previously if the "non well formed" notice was converted into an
exception we'd still end up executing the function.

Also drop the

Handle "non well formed" exception during ZPP

Previously if the "non well formed" notice was converted into an
exception we'd still end up executing the function.

Also drop the now unnecessary EG(exception) checks in the engine.

Additionally remote a bogus exception in zend_is_callable: It
should only be writing to error, but not directly throwing.

show more ...


Revision tags: php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# ab938d7b 26-Sep-2019 Nikita Popov

Fix memory leak with ** on array operands


Revision tags: php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2
# 638c2176 23-Jun-2019 Peter Kokot

Remove HAVE_STRCOLL check

The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~ns

Remove HAVE_STRCOLL check

The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3

- Remove also SKIPIF strcoll check in test

show more ...


Revision tags: php-7.3.7RC3
# a59e0cfc 20-Jun-2019 Nikita Popov

Disable float division by zero sanitizer for div_function

We intentionally divide by zero here and want to get IEEE-754
semantics.


# ed2a2423 19-Jun-2019 Nikita Popov

Fix signed shift UB


# 82a34e71 19-Jun-2019 Nikita Popov

Avoid overflow UB in is_numeric_string

We intentionally overflow the signed space here, so make this an
unsigned variable and only cast to signed at the end.


Revision tags: php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30
# 8f8fcbbd 27-May-2019 Nikita Popov

Support full variance if autoloading is used

Keep track of delayed variance obligations and check them after
linking a class is otherwise finished. Obligations may either be
unresolv

Support full variance if autoloading is used

Keep track of delayed variance obligations and check them after
linking a class is otherwise finished. Obligations may either be
unresolved method compatibility (because the necessecary classes
aren't available yet) or open parent/interface dependencies. The
latter occur because we allow the use of not fully linked classes
as parents/interfaces now.

An important aspect of the implementation is we do not require
classes involved in variance checks to be fully linked in order for
the class to be fully linked. Because the involved types do have to
exist in the class table (as partially linked classes) and we do
check these for correct variance, we have the guarantee that either
those classes will successfully link lateron or generate an error,
but there is no way to actually use them until that point and as
such no possibility of violating the variance contract. This is
important because it ensures that a class declaration always either
errors or will produce an immediately usable class afterwards --
there are no cases where the finalization of the class declaration
has to be delayed until a later time, as earlier variants of this
patch did.

Because variance checks deal with classes in various stages of
linking, we need to use a special instanceof implementation that
supports this, and also introduce finer-grained flags that tell us
which parts have been linked already and which haven't.

Class autoloading for variance checks is delayed into a separate
stage after the class is otherwise linked and before delayed
variance obligations are processed. This separation is needed to
handle cases like A extends B extends C, where B is the autoload
root, but C is required to check variance. This could end up
loading C while the class structure of B is in an inconsistent
state.

show more ...


# be74ca49 06-Jun-2019 Dmitry Stogov

Support for exceptions thrown during "Array to string conversion" error processing


# 457392fa 05-Jun-2019 Dmitry Stogov

Cheaper checks for exceptions thrown from __toString()


Revision tags: php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28, php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16
# a31f4642 26-Feb-2019 Nikita Popov

Allow exceptions in __toString()

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

And convert some object to string conversion related recoverable
fatal errors into Error excep

Allow exceptions in __toString()

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

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.

show more ...


# 49a3b03e 08-May-2019 Nikita Popov

Implement basic variance support

This is a minimal variance implementation: It does not support any
cyclic type dependencies. Additionally the preloading requirements
are much more r

Implement basic variance support

This is a minimal variance implementation: It does not support any
cyclic type dependencies. Additionally the preloading requirements
are much more restrictive than necessary. Hopefully we can relax
these in the future.

show more ...


# 9038d5c6 04-Apr-2019 Dmitry Stogov

Make is_identical() functions return zend_bool (instead of int)


Revision tags: php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2, php-7.2.15RC1
# 92ac598a 22-Jan-2019 Peter Kokot

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.

show more ...


# a81202ac 30-Jan-2019 Zeev Suraski

Adios, yearly copyright ranges


Revision tags: php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14, php-7.2.14RC1, php-7.3.1RC1, php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0, php-7.1.25RC1, php-7.2.13RC1, php-7.3.0RC6, php-7.1.24, php-7.2.12, php-7.3.0RC5
# 9afce019 01-Nov-2018 Zeev Suraski

Future-proof email addresses


# 54dc07f3 01-Nov-2018 Zeev Suraski

Update email addresses. We're still @Zend, but future proofing it...


Revision tags: php-7.1.24RC1, php-7.2.12RC1, php-7.3.0RC4
# 902d39a3 13-Oct-2018 Peter Kokot

Trim trailing whitespace in source code files


12345678910>>...24