summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_print.c
Commit message (Collapse)AuthorAgeFilesLines
* Reference dynamic functions through dynamic_defsNikita Popov2021-03-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, dynamically declared functions and closures are inserted into the function table under a runtime definition key, and then later possibly renamed. When opcache is not used and a file containing a closure is repeatedly included, this leads to a very large memory leak, as the no longer needed closure declarations will never be freed (https://bugs.php.net/bug.php?id=76982). With this patch, dynamic functions are instead stored in a dynamic_func_defs member on the op_array, which opcodes reference by index. When the parent op_array is destroyed, the dynamic_func_defs it contains are also destroyed (unless they are stilled used elsewhere, e.g. because they have been bound, or are used by a live closure). This resolves the fundamental part of the leak, though doesn't completely fix it yet due to some arena allocations. The main non-obvious change here is to static variable handling: We can't destroy static_variables_ptr in destroy_op_array, as e.g. that would clear the static variables in a dynamic function when the op_array containing it is destroyed. Static variable destruction is separated out for this reason (we already do static variable destruction separately for normal functions, so we only need to handle main scripts). Closes GH-5595.
* Replace zend_bool uses with boolNikita Popov2021-01-151-1/+1
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Constify char * arguments of APIstwosee2020-06-081-6/+6
| | | | Closes GH-5676.
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | Closes GH-4732.
* Remove year range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Trailing whitespacesGabriel Caruso2018-01-031-1/+1
| | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* year++Xinchen Hui2018-01-021-1/+1
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* - get rid of EG(scope). zend_get_executed_scope() should be used instead.Dmitry Stogov2016-04-281-2/+4
| | | | - ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
* Fix bug #71575 removing extra semicolons outside macrosJames Titcumb2016-03-031-1/+1
|
* Fix crash when advancing inside an internal functionBob Weinand2016-02-171-2/+2
| | | | This just happened in the "double ctrl+c" mode, when we halted inside an internal function; there was some code assuming a proper op_array
* Format string fixesNikita Popov2016-02-141-2/+2
| | | | | Conflicts: ext/pgsql/pgsql.c
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
| * go back with phpdbg to the state of 5.6.3, reverting the controversial ↵Ferenc Kovacs2014-11-261-61/+50
| | | | | | | | commits(remote debugging/xml protocol)
* | Always lowercase function names for lookup in phpdbg -pBob Weinand2015-07-221-6/+12
| |
* | Fixed opcodes printing.Xinchen Hui2015-07-221-6/+7
| | | | | | | | | | | | -p"function" -p"class::" -p"class::method"
* | Switch asprintf to spprintf in phpdbg opcode dumpNikita Popov2015-07-171-9/+5
| | | | | | | | | | | | | | Also use %td where appropriate, a lot of the values are ptrdiff based. Fix a leak in phpdbg_frame.c.
* | Show also runtime-bound functions/classes/methods with phpdbg -pBob Weinand2015-07-141-19/+55
| |
* | Better opcode dump for finallyNikita Popov2015-07-101-2/+1
| | | | | | | | | | | | | | * Move opcode decode into opline decode, so we can adjust it for extended_value. * Show extended_value and secondary jump ops for FAST_CALL and FAST_RET.
* | Simplify TMP var number decoding (without HashTable)Dmitry Stogov2015-07-061-4/+1
| |
* | Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-19/+19
| | | | | | | | semantick changes).
* | Fix phpdbg class fetch / method opcodesBob Weinand2015-05-271-4/+4
| |
* | Print should be in *current* context (stack)Bob Weinand2015-04-251-6/+6
| |
* | Add line_start/end info to main op_arrayBob Weinand2015-04-251-2/+2
| |
* | Shrink phpdbg opcode dump output a bit moreBob Weinand2015-04-201-2/+2
| |
* | show opcode countBob Weinand2015-04-201-16/+13
| |
* | Shorten opline dump lines and show literalsBob Weinand2015-04-201-8/+15
| |
* | Provide method to access opcodes via command line argumentBob Weinand2015-04-191-0/+118
| |
* | Fix parent command offsetsBob Weinand2015-03-211-1/+1
| |
* | s/PHP Version 5/PHP Version 7/gLior Kaplan2015-03-131-1/+1
| | | | | | | | Follow up for d0cb7153
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-11/+11
| |
* | Made phpdbg compatible with new engineBob Weinand2014-10-241-74/+83
|\ \ | |/
| * Merge phpdbg into PHP-5.6Bob Weinand2014-10-241-50/+61
| |
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | master renames phase 2Anatol Belski2014-08-251-1/+1
|/
* Merge sapi/phpdbg into PHP-5.6Bob Weinand2014-04-211-90/+85
|
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Merge branch 'master' of sapi/phpdbg into PHP-5.6Bob Weinand2013-12-201-0/+258
Including phpdbg.