summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Report errors from stream read and write operationsNikita Popov2019-07-221-1/+1
| | | | | | | | | | | | | | | | | | 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.
* Initialize last_line in phpdbg globalsNikita Popov2019-07-011-0/+1
|
* Avoid reliance on arena details on phpdbg oplogNikita Popov2019-06-281-5/+3
| | | | | | 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 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-271-3/+3
| | | | | Uses system allocator when backing up settings ... let's avoid unnecessary confusion.
* Fix prompt leak in phpdbgNikita Popov2019-06-211-3/+3
|
* Register class before fetching parentNikita Popov2019-06-111-3/+3
| | | | | We want the class declaration to be available while compiling the parent class.
* Fix potentially uninitialized warnings in phpdbgNikita Popov2019-04-121-2/+3
|
* Implemented a faster way to access predefined TSRM resources - CG(), EG(), etc.Dmitry Stogov2019-03-141-2/+1
|
* Avoid reinitailization of ZTS cache pointer. Initialize it once in TSRM.cDmitry Stogov2019-03-121-0/+2
|
* Use TSRM macrosDmitry Stogov2019-02-121-1/+2
|
* Update and fix remaining year ranges (2019)Peter Kokot2019-02-081-1/+1
| | | | | | This patch follows previous license year ranges updates. With new approach source code files now have simplified headers with license information without year ranges.
* Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Don't wrap php_module_shutdown() with zend_try. executor_globals are ↵Dmitry Stogov2018-10-251-3/+1
| | | | released in ZTS build, and this leads to crash.
* Keep information about unresolved interfaces in ↵Dmitry Stogov2018-08-231-1/+1
| | | | | | | zend_class_entry->interface_names. Move interface implementation code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
* Replace zend_class_entry->traits by persistent zend_class_entry->trait_names.Dmitry Stogov2018-08-231-1/+1
| | | | | Move trait binding code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
* Pack zend_constant.flags and zend_constant.module_number into reserved space ↵Dmitry Stogov2018-07-261-6/+3
| | | | inside zend_constant.value.
* Remove duplicated code (keep destroy_zend_function() for compatibility)Dmitry Stogov2018-06-271-2/+1
|
* Merge branch 'PHP-7.2'Christoph M. Becker2018-06-251-3/+3
|\ | | | | | | | | * PHP-7.2: Fix arginfo wrt. optional/required parameters
| * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-06-251-3/+3
| |\ | | | | | | | | | | | | * PHP-7.1: Fix arginfo wrt. optional/required parameters
| | * Fix arginfo wrt. optional/required parametersChristoph M. Becker2018-06-251-3/+3
| | | | | | | | | | | | | | | All parameters of phpdbg_color(), phpdbg_exec() and phpdbg_prompt() are required. We mark them as such.
* | | Remove useless PHPDBG_* constantsChristoph M. Becker2018-06-251-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | The sole purpose of `PHPDBG_FILE`, `PHPDBG_METHOD`, `PHPDBG_LINENO` and `PHPDBG_FUNC` has been to be passed as first argument to `phpdbg_break`. However, this functions is replaced as of PHP 5.6.3 by `phpdbg_break_file`, `phpdbg_break_method` and 'phpdbg_break_func`, respectively. Therefore, we're finally removing the useless constants.
* | | Merge branch 'PHP-7.2'Thomas Punt2018-04-261-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Allocate default ini values into persistent memory
| * | Merge branch 'PHP-7.1' into PHP-7.2Thomas Punt2018-04-261-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Allocate default ini values into persistent memory
| | * Allocate default ini values into persistent memoryThomas Punt2018-04-261-1/+1
| | |
* | | Merge branch 'PHP-7.2'Thomas Punt2018-04-261-0/+5
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix memory leak when phpdbg fails to start up
| * | Merge branch 'PHP-7.1' into PHP-7.2Thomas Punt2018-04-261-0/+5
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix memory leak when phpdbg fails to start up
| | * Fix memory leak when phpdbg fails to start upThomas Punt2018-04-261-0/+5
| | |
| | * year++Xinchen Hui2018-01-021-2/+2
| | |
| * | year++Xinchen Hui2018-01-021-2/+2
| | |
* | | Use int instead of integer in protoGabriel Caruso2018-02-021-2/+2
| | |
* | | Trailing whitespacesGabriel Caruso2018-01-031-1/+1
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | year++Xinchen Hui2018-01-021-2/+2
| | |
* | | Fixed stream handler overrideDmitry Stogov2017-12-141-7/+11
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-4/+7
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| | |
* | | Added exceptions for ZEND_RC_DEBUGDmitry Stogov2017-11-021-0/+1
| | |
* | | Encapsulate reference-counting primitives.Dmitry Stogov2017-10-271-3/+3
|/ / | | | | | | | | | | Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead. Added mactros to validate reference-counting (disabled for now). These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
* | Merge branch 'PHP-7.1'Joe Watkins2017-07-171-1/+5
|\ \ | |/ | | | | | | * PHP-7.1: Fixed bug 74913 redirecting incorrect include <sys/poll.h>
| * Merge branch 'PHP-7.0' into PHP-7.1Joe Watkins2017-07-171-1/+5
| |\ | | | | | | | | | | | | * PHP-7.0: Fixed bug 74913 redirecting incorrect include <sys/poll.h>
| | * Fixed bug 74913 redirecting incorrect include <sys/poll.h>Peter Kokot2017-07-171-1/+5
| | |
| | * Revert "fix crash in phpdbg shutdown process when opcache is loaded"Joe Watkins2017-02-271-2/+1
| | | | | | | | | | | | This reverts commit 008fb28eafa3740b1e3696b1a5cf7566d493b97d.
* | | Interned strings unification for TS/NTSAnatol Belski2017-03-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hereby, interned strings are supported in thread safe PHP. The patch implements two types of interned strings - interning per process, strings are not freed till process end - interning per request, strings are freed at request end There is no runtime interning. With Opcache, all the permanent iterned strings are copied into SHM on startup, additional copying into SHM might happen on demand.
* | | Merge branch 'PHP-7.1'Joe Watkins2017-02-271-1/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.1: fix crash in phpdbg shutdown process when opcache is loaded
| * | Merge branch 'PHP-7.0' into PHP-7.1Joe Watkins2017-02-271-1/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.0: fix crash in phpdbg shutdown process when opcache is loaded
| | * fix crash in phpdbg shutdown process when opcache is loadedJoe Watkins2017-02-271-1/+2
| | |
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-2/+2
| | |