| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Closes GH-6636.
|
|
|
|
|
| |
This reverts commit 5e15c9c41f8318a8392c2e2c78544f218736549c, since
re2c default rules are only available as of re2c 0.13.7.
|
|
|
|
|
|
|
|
|
|
| |
We avoid `YYCURSOR` becoming `NULL` by initializing `YYMARKER`, and add
a default rule for `<NORMAL>` where we catch unexpected input.
We also fix the only superficially related issue regarding empty input
followed by `T_SEPARATOR` and command, which caused another segfault.
Closes GH-6464.
|
| |
|
|
|
|
|
|
| |
We expect zvals, so we should request zvals.
We also suppress spurious watchpoint removal notices.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Properly initialize PHPDBG_G(watch_tmp)
Otherwise that may cause segfaults in ZTS builds.
* Deactivate potentially remaining watchpoints after REPL
Otherwise the memory could still be protected, resulting in segfaults
during shutdown.
* NULL zend_handlers_table after freeing
As of commit 4130fe4[1], the `zend_handlers_table` is explicitly
freed in the `zend_vm_dtor()`. Since phpdbg (and maybe some other
SAPIs) may restart the engine afterwards, we have to make sure that
the table is also NULLed.
* Only set context option if there is a context
In other words, we must not follow the null pointer.
* Cater to file handles without attached console
File handles do not necessarily have an attached console (for
instance, pipes do not), in which case `GetConsoleScreenBufferInfo()`
fails. In this case we set a default value (`40`) for lines like on
other systems.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=4130fe437a5db7ead1444d3748bd0fbad9829cb2>
|
|
|
|
| |
We are more liberal, and accept Windows line endings (CRLF) as well.
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fix INI setting member name
|
| |
| |
| |
| |
| |
| | |
Since the member is not used in `OnUpdateEol()` that's not really an
issue, but still it's confusing to apparently have two INI settings
targeting the same member.
|
| |
| |
| |
| | |
Mostly reindent PHP scripts to spaces.
|
| | |
|
| |
| |
| |
| |
| |
| | |
overhead and improves performance."
This reverts commit eef85229d0fe9f69d325aa0231e592f35c468afb.
|
| |
| |
| |
| |
| | |
The meaning of the limit changed in 7.4, it now points one past the
end. Adjust code accordingly.
|
| |
| |
| |
| | |
and improves performance.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit e0eca262852dba1a78afcde64a49126c81fead1a.
free_filename is used by the wincache extension, restore this
field for PHP 7.4.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.
As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).
I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Disable buffering in PHP streams, to avoid storing and copying the
file contents twice.
This will call stream_set_option() on custom stream wrapper as
well, so the method needs to be implemented to avoid a warning.
|
| |
| |
| |
| |
| | |
The buf/len members are now simply used in addition to the main
stream, without changing the handle kind.
|
| |
| |
| |
| | |
free_filename was always zero.
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | | |
This is a backport of a9821255612a99f9773c3601ff1914de4e7a7e32.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of handling shebang lines by adjusting the file pointer in
individual SAPIs, move the handling into the lexer, where this is
both a lot simpler and more robust. Whether the shebang should be
skipped is controlled by CG(skip_shebang) -- we might want to do
that in more cases.
This fixed bugs #60677 and #78066.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
memcmp() only makes sense on equal length strings, and here we don't
know anything about the length of the input.
|
| | |
| | |
| | |
| | |
| | | |
Clang doesn't like the use of promoted zend_bool in va_start. As
the function isn't used anyway, I'm simply dropping it...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also adds an --asan flag to run-tests.php to setup all the necessary
environment variables. Some tests are marked as skipped because they
are incompatible with asan or too slow.
I'm basing this on the DEBUG_ZTS build, which seems to give us the
most mileage.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of guessing what the address of the first arena allocation
is going to be, embed the sentinel in the oplog_list structure
directly.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In particular, make sure that everything using zmm is released
before zmm is shut down. phpdbg currently gets away with this,
because either a) its custom handlers are used and no auto-free
happens or b) the system allocator is used and no auto-free happens.
With the tracking allocator for asan this no longer works.
|
| | |
| | |
| | |
| | |
| | | |
Uses system allocator when backing up settings ... let's avoid
unnecessary confusion.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems that this code has a peculiar interpretation of "len",
where it actually points to the last character, not one past it.
So we need +1 here for that extra char and another +1 for the
terminating null byte.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Apparently I did this only on masster...
|
| | |
| | |
| | |
| | |
| | | |
%pure-parser is deprecated. In our case there is no difference between
true & full, as we don't use locations.
|
| | |
| | |
| | |
| | |
| | | |
We want the class declaration to be available while compiling the
parent class.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This reverts commit 969047749d33bb88a0573aa91a57e2070335111a.
|
| | |
| | |
| | |
| | |
| | | |
This syncs PHP lexer files to all use *.re extension. The *.re files are
processed with the RE2C tool.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
|