summaryrefslogtreecommitdiff
path: root/sapi/phpdbg
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug #80757 (Exit code is 0 when could not open file)Felipe Pena2021-02-241-0/+1
|
* Update year to 2021Peter Kokot2021-02-021-1/+1
| | | | Closes GH-6636.
* Revert "Fix #76813: Access violation near NULL on source operand"Christoph M. Becker2021-01-113-21/+3
| | | | | This reverts commit 5e15c9c41f8318a8392c2e2c78544f218736549c, since re2c default rules are only available as of re2c 0.13.7.
* Fix #76813: Access violation near NULL on source operandChristoph M. Becker2020-11-303-3/+21
| | | | | | | | | | 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.
* Skip new watch point test under asanNikita Popov2020-06-031-0/+6
|
* Fix #73927: phpdbg fails with windows error prompt at "watch array"Christoph M. Becker2020-06-023-7/+55
| | | | | | We expect zvals, so we should request zvals. We also suppress spurious watchpoint removal notices.
* Make phpdbg test portableChristoph M. Becker2020-05-261-1/+1
|
* Fix several mostly Windows related phpdbg bugsChristoph M. Becker2020-05-264-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fix #73926: phpdbg will not accept input on restart executionChristoph M. Becker2020-05-261-1/+1
| | | | We are more liberal, and accept Windows line endings (CRLF) as well.
* Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-05-191-1/+1
|\ | | | | | | | | * PHP-7.3: Fix INI setting member name
| * Fix INI setting member nameChristoph M. Becker2020-05-191-1/+1
| | | | | | | | | | | | 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.
* | Apply tidy formattingNikita Popov2020-02-033-108/+108
| | | | | | | | Mostly reindent PHP scripts to spaces.
* | Fix miscellaneous typos in docsTyson Andre2019-10-191-1/+1
| |
* | Revert "Link executable files using non PIC object files. This reduces PIC ↵Dmitry Stogov2019-10-101-3/+3
| | | | | | | | | | | | overhead and improves performance." This reverts commit eef85229d0fe9f69d325aa0231e592f35c468afb.
* | Fix symtable_cache_limit assignment in phpdbgNikita Popov2019-09-141-1/+1
| | | | | | | | | | The meaning of the limit changed in 7.4, it now points one past the end. Adjust code accordingly.
* | Link executable files using non PIC object files. This reduces PIC overhead ↵Dmitry Stogov2019-09-071-3/+3
| | | | | | | | and improves performance.
* | Revert "Drop free_filename field from zend_file_handle"Nikita Popov2019-07-241-0/+4
| | | | | | | | | | | | | | This reverts commit e0eca262852dba1a78afcde64a49126c81fead1a. free_filename is used by the wincache extension, restore this field for PHP 7.4.
* | Report errors from stream read and write operationsNikita Popov2019-07-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Avoid double buffering in Zend streamsNikita Popov2019-07-171-0/+1
| | | | | | | | | | | | | | | | 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.
* | Remove ZEND_HANDLE_MAPPEDNikita Popov2019-07-161-3/+0
| | | | | | | | | | The buf/len members are now simply used in addition to the main stream, without changing the handle kind.
* | Drop free_filename field from zend_file_handleNikita Popov2019-07-161-4/+0
| | | | | | | | free_filename was always zero.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-07-162-0/+17
|\ \ | |/
| * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-07-162-0/+17
| |\
| | * Fixed bug #78297Nikita Popov2019-07-162-0/+17
| | |
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-06-041-17/+17
| |\ \ | | |/
| | * Fixed bug #78050Nikita Popov2019-06-041-17/+17
| | | | | | | | | | | | This is a backport of a9821255612a99f9773c3601ff1914de4e7a7e32.
* | | Move shebang handling into the lexerNikita Popov2019-07-151-46/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Initialize last_line in phpdbg globalsNikita Popov2019-07-011-0/+1
| | |
* | | Use strcmp() in phpdbg_eol_global_updateNikita Popov2019-06-281-3/+3
| | | | | | | | | | | | | | | memcmp() only makes sense on equal length strings, and here we don't know anything about the length of the input.
* | | Remove phpdbg_xml_asprintf()Nikita Popov2019-06-282-14/+0
| | | | | | | | | | | | | | | 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...
* | | Set up asan+ubsan scheduled build on azureNikita Popov2019-06-286-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Avoid reliance on arena details on phpdbg oplogNikita Popov2019-06-282-6/+4
| | | | | | | | | | | | | | | | | | Instead of guessing what the address of the first arena allocation is going to be, embed the sentinel in the oplog_list structure directly.
* | | implement tsrm_is_shutdown APIJoe Watkins2019-06-281-2/+2
| | |
* | | Use the portable zend_strndup() instead of strndup()Christoph M. Becker2019-06-281-1/+1
| | |
* | | Fix init_file leak in phpdbgNikita Popov2019-06-281-0/+1
| | |
* | | Fix phpdbg shutdown orderNikita Popov2019-06-271-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Don't use zmm for PHPDBG_G(exec)Nikita Popov2019-06-273-8/+8
| | | | | | | | | | | | | | | Uses system allocator when backing up settings ... let's avoid unnecessary confusion.
* | | Fix out of bounds write in phpdbgNikita Popov2019-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Fix stack leak in phpdbgNikita Popov2019-06-211-1/+8
| | |
* | | Fix prompt leak in phpdbgNikita Popov2019-06-211-3/+3
| | |
* | | Fix skipif syntax errorsNikita Popov2019-06-146-6/+6
| | | | | | | | | | | | Apparently I did this only on masster...
* | | Use %define api.pure instead of %pure-parserNikita Popov2019-06-121-1/+1
| | | | | | | | | | | | | | | %pure-parser is deprecated. In our case there is no difference between true & full, as we don't use locations.
* | | Register class before fetching parentNikita Popov2019-06-111-3/+3
| | | | | | | | | | | | | | | We want the class declaration to be available while compiling the parent class.
* | | use XFAILIF rather than XFAIL to avoid warnings [ci skip]Joe Watkins2019-06-116-12/+36
| | |
* | | watchpoints have flaws in implementationJoe Watkins2019-06-106-0/+12
| | |
* | | Try to fix phpdbg + opcache compatibilityNikita Popov2019-06-041-17/+17
| | |
* | | Update phpdbg oplog testNikita Popov2019-05-291-1/+1
| | |
* | | Revert "Rename *.l files to *.re"Joe Watkins2019-05-202-4/+4
| | | | | | | | | | | | This reverts commit 969047749d33bb88a0573aa91a57e2070335111a.
* | | Rename *.l files to *.rePeter Kokot2019-05-172-4/+4
| | | | | | | | | | | | | | | This syncs PHP lexer files to all use *.re extension. The *.re files are processed with the RE2C tool.
* | | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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