History log of /PHP-7.3/Zend/zend_compile.c (Results 1 – 25 of 2085)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 249e4909 06-Dec-2019 Nikita Popov

Fix constant evaluation of && and ||

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 o

Fix constant evaluation of && and ||

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.

show more ...


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, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1
# 239e2dda 04-Oct-2019 Nikita Popov

Make sure T_ERROR is returned for all lexer exceptions

This originally manifested as a leak in oss-fuzz #18000. The following
is a reduced test case:

<?php
[

Make sure T_ERROR is returned for all lexer exceptions

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.

show more ...


# a5d3620d 02-Oct-2019 Nikita Popov

Fix segfault with __COMPILER_HALT_OFFSET__ and trailing {}

Fixes OSS-Fuzz #17895.


Revision tags: php-7.4.0RC3, 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
# f3fdf570 12-Aug-2019 Nikita Popov

Intern alias old_name early

This is likely going to end up interned lateron at some point
when the new_name is referenced somewhere. However, it may be
that there are some uses that

Intern alias old_name early

This is likely going to end up interned lateron at some point
when the new_name is referenced somewhere. However, it may be
that there are some uses that do not get interned before that.
In this case we will intern a string that already have zval
users, without updating the refcounted flag on those zvals.

In particular this can happen with something like [Foo::class],
where Foo is an imported symbol. The string it resolves to won't
get interned right away, but may be interned later.

use Foo as Bar;
$x = [Bar::class];
var_dump(Bar::X);
debug_zval_dump($x); // Will show negative refcount
class Foo {
const X = 1;
}

However, this doesn't really fix the root cause, there are probably
other situations where something similar can occur.

show more ...


Revision tags: 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, php-7.3.7RC3, 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, 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
# c7920aba 14-Mar-2019 Xinchen Hui

Fixed bug #77738 (Nullptr deref in zend_compile_expr)


Revision tags: php-7.1.27, php-7.3.3, php-7.2.16
# 4ac954ac 25-Feb-2019 Xinchen Hui

Fixed compiler warning


# 1c22ace0 25-Feb-2019 Xinchen Hui

Fixed bug #77660 (Segmentation fault on break 2147483648)


# 53881438 22-Feb-2019 Nikita Popov

Fixed bug #77652


Revision tags: php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2, php-7.2.15RC1
# 34898e97 29-Jan-2019 Nikita Popov

Make special assert() handling independent of compiler flags


# ef68cd32 28-Jan-2019 ekinhbayar

Fixed bug #77530: PHP crashes when parsing "(2)::class"


# 526344aa 24-Jan-2019 Nikita Popov

Add flag to disable jumptable optimization

This is useful for coverage. While it is currently safe to just
skip over the SWITCH_* opcodes, this may not be true in the future
due to o

Add flag to disable jumptable optimization

This is useful for coverage. While it is currently safe to just
skip over the SWITCH_* opcodes, this may not be true in the future
due to opcache optimizations, so it's safer to disable emission of
SWITCH_* opcodes entirely.

show more ...


Revision tags: php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14
# 41af1e67 04-Jan-2019 Nikita Popov

Fix self::class inside constant in global scope

Previously this triggered an assertion failure. The behavior is
not quite correct, in that self::class should generate an exception
if

Fix self::class inside constant in global scope

Previously this triggered an assertion failure. The behavior is
not quite correct, in that self::class should generate an exception
if there is no self, but returns an empty string here. Fixing that
would be a bit too intrusive for the 7.2 branch.

show more ...


# 73596c56 02-Jan-2019 Nikita Popov

Partial fix for bug #75426

This does not print the exact line of the comma, but rather the line
of the previous element. This should generally be "good enough", as
the line number is

Partial fix for bug #75426

This does not print the exact line of the comma, but rather the line
of the previous element. This should generally be "good enough", as
the line number is close (off by one) to the actual issue now.
Previously it would point to the start of the array, which may be
very far away.

show more ...


# 7e597f48 24-Dec-2018 Dmitry Stogov

Fixed bug #77339 (__callStatic may get incorrect arguments)


Revision tags: php-7.2.14RC1, php-7.3.1RC1
# 93aabf15 10-Dec-2018 Nikita Popov

Fixed bug #77275

Instead of juggling with this problem during literal compaction,
make sure that we always initialize Z_EXTRA for literals, which
seems like the more robust solution.


Revision tags: php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0
# b565c85b 27-Nov-2018 Nikita Popov

Improve fix for #76046

Also locate the JMP at the start of the foreach.

Patch suggested by Derick.


# d6595f27 27-Nov-2018 Nikita Popov

Fixed bug #76046

Place FE_FREE on start line of foreach, instead of whatever random
line number might be in CG(zend_lineno) at the time.


Revision tags: 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


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


# 7f6387b5 13-Oct-2018 Peter Kokot

Trim trailing whitespace in source code files


Revision tags: php-7.1.23, php-7.2.11, php-7.3.0RC3
# 8b8b625d 29-Sep-2018 Nikita Popov

Fixed bug #72635

This seems to be a simple oversight, where we did not enable
exceptions. Other constexpr conditions already throw, so there is
no particular reason to stick to a fat

Fixed bug #72635

This seems to be a simple oversight, where we did not enable
exceptions. Other constexpr conditions already throw, so there is
no particular reason to stick to a fatal error here.

show more ...


Revision tags: php-7.1.23RC1, php-7.2.11RC1, php-7.3.0RC2, php-5.6.38, php-7.1.22, php-7.3.0RC1, php-7.2.10, php-7.0.32, php-7.1.22RC1, php-7.3.0beta3, php-7.2.10RC1
# b8828926 20-Aug-2018 Dmitry Stogov

Avoid hash lookups in BIND_STATIC and BIND_LEXICAL opcode handlers.
Encode static variable offset into opline->extended_value.


Revision tags: php-7.1.21, php-7.2.9, php-7.3.0beta2, php-7.1.21RC1, php-7.3.0beta1, php-7.2.9RC1
# 3ced766d 30-Jul-2018 Dmitry Stogov

Removed duplicate code. zend_fetch_dimension_address_LIST_w() was a copy of zend_fetch_dimension_address_W(), ZEND_FETCH_LIST_W_SPEC_CV_... a copy of ZEND_FETCH_DIM_W_SPEC_CV_...


# ab8094c6 26-Jul-2018 Dmitry Stogov

Pack zend_constant.flags and zend_constant.module_number into reserved space inside zend_constant.value.


# f950128c 25-Jul-2018 Dmitry Stogov

Encode parent class name as IS_CONST operand in DECLARE_INHERITED_CLASS and DECLARE_ANON_INHERITED_CLASS opcodes (eliminate FETCH_CLAS
S opcode).


12345678910>>...84