summaryrefslogtreecommitdiff
path: root/sapi/phpdbg
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-021-1/+1
|\ | | | | | | | | * PHP-7.4: Update year to 2021
| * 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.
* | Revert fix for bug 76813 and re2c version bumpChristoph M. Becker2021-01-113-21/+3
| | | | | | | | | | | | | | | | | | | | | | CentOS 7 ships with re2c 0.13.5 by default, so we should not have bumped the required re2c version to 0.13.7. However, 0.13.5 does not support default rules, so we cannot use them to fix bug 76813. This reverts commit 420184ad529443182c9a348a55b1c9216005c613 and 5e15c9c41f8318a8392c2e2c78544f218736549c. Closes GH-6593.
* | Drop all JIT related XFAILS from phpdbg test suiteChristoph M. Becker2020-11-3019-93/+0
| | | | | | | | phpdbg now disables JIT, so these cause XFAIL warnings.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-11-303-3/+21
|\ \ | |/ | | | | | | * PHP-7.4: Fix #76813: Access violation near NULL on source operand
| * 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.
* | Consolidate the usage of "either" and "one of" in error messagesMáté Kocsis2020-09-201-1/+1
| | | | | | | | Closes GH-6173
* | Remove support for EXT_NOPNikita Popov2020-09-181-1/+2
| | | | | | | | | | | | This is an annoying edge case that regularly gets broken. As we're not aware of significant users of this API, and there are other ways to hook this, remove support for EXT_NOP.
* | Simplify error type filtertwosee2020-09-101-25/+18
| | | | | | | | Closes GH-6049.
* | Adjust assignment line number for matchIlija Tovilo2020-09-084-0/+128
| | | | | | | | | | | | | | | | Otherwise the assignment will have the same number as the default arm which will 1. mis-trigger a breakpoint and 2. mark the line as covered even when it isn't. Closes GH-6083
* | Accept zend_string instead of zval in zend_compile_stringNikita Popov2020-09-074-22/+11
| |
* | Disable report_zend_debug by defaultNikita Popov2020-08-121-12/+1
| | | | | | | | | | | | We might just want to drop this completely, but at least don't enable it by default. It already gets disabled by a number of SAPIs, but we should make that the default state.
* | Fixed bug #62294Nikita Popov2020-08-101-1/+0
| | | | | | | | | | | | | | The primary issue was already resolved in 7c3e487289ec41e560cf7a77e36eb43da2234f33, but the particular example used in this bug report ran into an additional issue on PHP 8, because I forgot to drop a number of zend_bailout calls when switch require failure to throw.
* | Accept zend_object* in zend_update_propertyNikita Popov2020-08-071-3/+2
| |
* | Accept zend_object* in zend_get_exception_baseNikita Popov2020-08-071-11/+8
| |
* | Accept zend_object in zend_read_propertyNikita Popov2020-08-071-6/+6
| |
* | Add more argument types to stubsMáté Kocsis2020-08-071-3/+1
| | | | | | | | Closes GH-5943
* | Disable JIT for PHPDBGDmitry Stogov2020-07-211-0/+12
| |
* | Remove no_separation flagNikita Popov2020-07-071-1/+0
| |
* | Remove proto comments from C filesMax Semenik2020-07-061-16/+12
| | | | | | | | Closes GH-5758
* | Use zend_string_equals API in a couple placesNikita Popov2020-07-031-1/+1
| |
* | Make exit() unwind properlyNikita Popov2020-06-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | exit() is now internally implemented by throwing an exception, performing a normal stack unwind and a clean shutdown. This ensures that no persistent resource leaks occur. The exception is internal, cannot be caught and does not result in the execution of finally blocks. This may be relaxed in the future. Closes GH-5768.
* | Mark phpdbg test as XFAIL on Windows with JIT enabledChristoph M. Becker2020-06-241-0/+6
| | | | | | | | The test fails as of commit 8b12ea04ee405f746ca2394672f8372c57fd05b2.
* | Include stub hash in generated arginfo filesNikita Popov2020-06-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary. This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files. Closes GH-5739.
* | Remove unnecessary initialization in phpdbg webhelperNikita Popov2020-06-231-1/+1
| | | | | | | | | | This whole code is very dubious and should possibly be dropped. For now just fix the build warning.
* | Fix Haiku buildDavid Carlier2020-06-191-0/+3
| | | | | | | | | | | | getrusage supports only two fields. The network api sits in the network lib. Closes GH-5732.
* | Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)Christoph M. Becker2020-06-161-2/+2
| | | | | | | | | | | | | | | | | | Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce `ZEND_UNREACHABLE()`, so that MSVC which does not consider `assert(0)` to mark unreachable code does no longer trigger C4715[1] warnings in debug builds. This may be useful for other compilers as well. [1] <https://docs.microsoft.com/de-de/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4715?view=vs-2019>
* | Add zend_call_known_function() API familyNikita Popov2020-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the following APIs: void zend_call_known_function( zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method( zend_function *fn, zend_object *object, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method_with_0_params( zend_function *fn, zend_object *object, zval *retval_ptr); void zend_call_known_instance_method_with_1_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param); void zend_call_known_instance_method_with_2_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2); These are used to perform a call if you already have the zend_function you want to call. zend_call_known_function() is the base API, the rest are just really thin wrappers around it for the common case of instance method calls. Closes GH-5692.
* | Constify char * arguments of APIstwosee2020-06-085-23/+17
| | | | | | | | Closes GH-5676.
* | Fix MSVC level 1 (severe) warningsChristoph M. Becker2020-06-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fix (hopefully) all instances of: * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312> `zend_llist_add_element()` and `zend_llist_prepend_element()` now explicitly expect a *const* pointer. We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress C4090; this should prevent accidential removal of the cast by clarifying the intention, and makes it easier to remove the casts if the issue[1] will be resolved sometime. [1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
* | Fix phpdbg watchpoints wrt. negative_array_index RFCChristoph M. Becker2020-06-051-3/+5
| | | | | | | | | | | | | | | | The implementation of that RFC changed the initial value of `zend_array.nNextFreeElement` to `-1`; we work around that by inserting first, and retrieving the index afterwards. We also fix the erroneous printf specifier for the unsigned integer.
* | Fix typo in skipif sectionNikita Popov2020-06-031-0/+1
| | | | | | | | Merge mistake...
* | Merge branch 'PHP-7.4'Nikita Popov2020-06-031-1/+3
|\ \ | |/ | | | | | | * PHP-7.4: Skip new watch point test under asan
| * Skip new watch point test under asanNikita Popov2020-06-031-0/+6
| |
* | Skip new test case on Windows when JIT is enabledChristoph M. Becker2020-06-021-0/+6
| | | | | | | | Cf. <http://git.php.net/?p=php-src.git;a=commit;h=c5cf0af8a98cbc574fd315bf9d78033b896886f3>.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-06-023-7/+55
|\ \ | |/ | | | | | | * PHP-7.4: Fix #73927: phpdbg fails with windows error prompt at "watch array"
| * 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.
* | Mark several phpdbg tests as xfailChristoph M. Becker2020-05-2717-0/+84
| | | | | | | | | | | | Apparently, breakpoints and watchpoints are practically disabled if run with OPcache JIT under Windows, so we mark the affected tests as xfail in that case for the time being.
* | Improve type error messages when an object is givenMáté Kocsis2020-05-261-2/+2
| | | | | | | | | | | | | | From now on, we always display the given object's type instead of just reporting "object". Additionally, make the format of return type errors match the format of argument errors. Closes GH-5625
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-05-266-8/+28
|\ \ | |/ | | | | | | | | | | | | * PHP-7.4: Enable phpdbg tests on AppVeyor Make phpdbg test portable Fix several mostly Windows related phpdbg bugs Fix #73926: phpdbg will not accept input on restart execution
| * 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.
* | Add --file-cache-prime/use options to run-testsNikita Popov2020-05-201-1/+1
| | | | | | | | | | | | | | | | --file-cache-prime populates the file cache, --file-cache-use uses the file cache. And fix a number of tests to run under file cache or disabled timestamp validation.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-05-191-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Fix INI setting member name
| * 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.
* | | Fix phpdbg test with JITNikita Popov2020-05-181-1/+1
| | | | | | | | | | | | | | | | | | With JIT one extra cache slot is allocated, so the extended_value needs one more character, and the output ends up having one space less...
* | | Remove some uses of zend_inline_hash_funcNikita Popov2020-05-152-9/+9
| | | | | | | | | | | | There's no need to force-inline the hashing for all of these.