| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Accidentially committed this when merging from 7.3.
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fixed bug #79062
|
| |
| |
| |
| | |
Back up the doc comment when performing heredoc scanahead.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Otherwise these warnings will turn up twice (or more...)
|
| |
| |
| |
| |
| | |
Since digits are allowed for identifiers, we have to cater to them as
well.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a PHP file contains an invalid hex literal such as `0x_10`, the expected error
is `Parse error: syntax error, unexpected 'x_10' (T_STRING) in %s on line %d`.
This already worked correctly on Linux, but on Windows prior to this patch a different
error was produced: `Parse error: Invalid numeric literal in %s on line %d`.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch removes generated lexer files by re2c during the build
process so they are not tracked by Git yet can be still shipped when
PHP is released. The genfiles script additionally provides generation
of these lexer files when creating a release of the PHP source code.
The genfiles script refactorings:
- added file header
- echoing steps instead of comments
- cleaning only lines starting with `#line`
- eval removed in favor of direct executed commands
- the debug mode `set -x` removed
- script can be called from any path
- improved comments
|
| | | |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | | |
Back up exceptions while the scan-ahead loop, to avoid an early
bail out.
|
| | |
| | |
| | |
| | | |
pseudo-main op_arrays.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The C89 standard and later defines the `<stdarg.h>` header as part of
the standard headers [1]. On current systems it is always present and
can be included unconditionally.
Checking for presence and functionality of the `<stdarg.h>` header and
variadic function is not relevant anymore on current systems since this
is always available.
Also Autoconf suggests relying on at least C89 or above [2] and [3].
The following files were regenerated with re2c 1.0.3:
- Zend/zend_language_scanner.c
- Zend/zend_language_scanner_defs.h
Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
|
| |
| |
| |
| |
| |
| |
| | |
destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
|
| | |
|
| | |
|
| |
| |
| |
| | |
where we sure about string persistence.
|
| |
| |
| |
| | |
is known to be a temporary allocated zend_string.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes
* The ending label no longer has to be followed by a semicolon or
newline. Any non-label character is fine.
* The ending label may be indented. The indentation will be stripped
from all lines in the heredoc/nowdoc string.
Lexing of heredoc strings performs a scan-ahead to determine the
indentation of the ending label, so that the correct amount of
indentation can be removed when calculting the semantic values for
use by the parser. This makes the implementation quite a bit more
complicated than we would like :/
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
ext/tokenizer) and cheaper whitespace handlig."
This reverts commit 0d6da03f5c3e49b92cf6817ba8a7f8d6f60ee1aa.
|
| |
| |
| |
| | |
cheaper whitespace handlig.
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
* PHP-7.1:
Update NEWS
Fixed bug #74947 (Segfault in scanner on INF number)
Conflicts:
Zend/zend_language_scanner.c
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* PHP-7.0:
Fixed bug #74947 (Segfault in scanner on INF number)
Conflicts:
Zend/zend_language_scanner.c
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \ |
|
| |/ / |
|
|/ / |
|
| |
| |
| |
| |
| | |
We allow negative numeric offsets for the simple syntax inside
double-quoted and heredoc strings.
|
| |
| |
| |
| | |
(cherry picked from commit 26964ccea0f52ed4d6beda3bcfd1508f6d3dad43)
|
| |
| |
| |
| |
| |
| | |
Introduce an on_event_context passed to the on_event hook. Use this
context to pass along the token array. Previously this was stored
in a non-tls global :/
|