summaryrefslogtreecommitdiff
path: root/sapi
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'Jakub Zelenka2020-12-134-6/+80
|\
| * Merge branch 'PHP-7.4' into PHP-8.0Jakub Zelenka2020-12-134-6/+80
| |\
| | * Fix bug #69625: FPM returns 200 status on request without SCRIPT_FILENAMEJakub Zelenka2020-12-134-6/+80
| | |
* | | Ensure consistent error message in phpdbg parserNikita Popov2020-12-022-3/+4
| | | | | | | | | | | | | | | | | | This would be either $end or "end of file" depending on bison version. Explicitly specify "end of command" instead, which seems more appropriate in context.
* | | Add const modifier for zend_extension memberscodinghuang2020-12-011-5/+4
| | | | | | | | | | | | Closes GH-6462.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2020-11-3019-93/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Drop all JIT related XFAILS from phpdbg test suite
| * | 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-8.0'Nikita Popov2020-11-303-0/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Add additional entries to unserialize corpus
| * | Add additional entries to unserialize corpusNikita Popov2020-11-303-0/+3
| | | | | | | | | | | | These are useful to seed typed property fuzzing.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2020-11-303-3/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #76813: Access violation near NULL on source operand
| * | 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.
* | | Add --repeat testing modeNikita Popov2020-10-301-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This testing mode executes the test multiple times in the same process (but in different requests). It is primarily intended to catch tracing JIT bugs, but also catches state leaks across requests. Closes GH-6365.
* | | Merge branch 'PHP-8.0'Máté Kocsis2020-10-231-1/+2
|\ \ \ | |/ /
| * | Require stubs to declare return types for magic methods when possibleMáté Kocsis2020-10-231-1/+2
| | | | | | | | | | | | Closes GH-6376
* | | Use ephemeral port in more server testsNikita Popov2020-10-2310-87/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port the main php_cli_server.inc to use ephemeral ports, thus allowing CLI server tests to be parallelized. A complication here is that we also need to give each test a separate doc root, to avoid index.php files writing over each other. Closes GH-6375.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-10-211-0/+65
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Add test for zend_extension loading
| * | Add test for zend_extension loadingNikita Popov2020-10-211-0/+65
| | | | | | | | | | | | Closes GH-6363.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-10-192-9/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Revert "Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir tree"
| * | Revert "Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir tree"Nikita Popov2020-10-192-9/+3
| | | | | | | | | | | | | | | | | | | | | This reverts commit 98bfad738ad2734dfba5733323f7ba733daf3ec3. This doesn't work well in some setups, see bug #80113 and GH-5051. Reverting this for now.
* | | Suppress bogus [-Wlogical-op] warning from GCCGeorge Peter Banyard2020-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See GCC bug 69602: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602 which emits the warning for (errno == EWOULDBLOCK || errno == EAGAIN) which is the correct way of handling errors as the value of EWOULDBLOCK and EAGAIN is implementation defined. Therefore introduce a new macro function PHP_IS_TRANSIENT_ERROR() which handles the case when EWOULDBLOCK and EAGAIN are identical. Thanks to @twose for the idea.
* | | Fix [-Wduplicated-branches] in CLI SAPIGeorge Peter Banyard2020-10-091-5/+1
|/ /
* | Update to mime-db 1.45Nikita Popov2020-10-092-3/+10
| |
* | Review parameter names in ext/pcreMáté Kocsis2020-10-021-10/+10
| | | | | | | | Closes GH-6259
* | Update ext/standard parameter namesNikita Popov2020-09-291-2/+2
| | | | | | | | Closes GH-6214.
* | Improve default value handling of Exception constructorsMáté Kocsis2020-09-211-2/+2
| | | | | | | | Closes GH-6166
* | Consolidate the usage of "either" and "one of" in error messagesMáté Kocsis2020-09-201-1/+1
| | | | | | | | Closes GH-6173
* | Fix UNKNOWN default value of apache_note()Máté Kocsis2020-09-193-4/+4
| | | | | | | | Closes GH-6167
* | Run tidyNikita Popov2020-09-1825-40/+40
| | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | 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.
* | Support ephemeral ports in debug serverSara Golemon2020-09-171-35/+65
| |
* | Add missing param type to pcre reflection testMáté Kocsis2020-09-151-1/+1
| |
* | Fix mbstring fuzzerNikita Popov2020-09-111-1/+3
| | | | | | | | | | mb_ereg can throw now, so we need a dummy frame and need to free the exception afterwards.
* | Simplify error type filtertwosee2020-09-102-37/+24
| | | | | | | | 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
* | Reduce input size limit in execute fuzzerNikita Popov2020-09-072-2/+2
| | | | | | | | | | We only have 4 Zend test cases > 8k. Large inputs tend to just make things slower.
* | Avoid large eval inputs in fuzzerNikita Popov2020-09-071-2/+17
| | | | | | | | | | | | While we limit the size of the main compilation input, the size of eval inputs was not limited. This could result in stack overflows, e.g. oss-fuzz #25464.
* | Accept zend_string instead of zval in zend_compile_stringNikita Popov2020-09-074-22/+11
| |
* | Disable InfiniteIterator class while fuzzingNikita Popov2020-09-041-0/+2
| | | | | | | | | | The combination of LimitIterator and InfiniteIterator can cause effectively infinite loops that bypass the executor step limit.
* | Extend function blacklist in execute fuzzerNikita Popov2020-09-021-1/+3
| | | | | | | | Add pfsockopen and stream_socket_server.
* | Support cli_server.color on WindowsChristoph M. Becker2020-08-281-2/+10
| | | | | | | | | | | | | | On Windows, we have to check whether stdout is attached to a console, and whether that console supports VT100 control codes. Closes GH-5996
* | Fix execute fuzzer on i386Nikita Popov2020-08-281-1/+5
| | | | | | | | Opcode handlers use the FASTCALL calling convention...
* | Rehash function table after disabling functionsNikita Popov2020-08-281-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | To perform fast shutdown without full table cleanup we need all internal functions to be in one continuous chunk. This was violated when functions were deleted via disable_functions. This drops the zend_disable_function() API in favor of zend_disable_functions(), which disables the given list of functions and performs the necessary rehash afterwards. Also drop PG(disabled_functions), which is no longer used.
* | Fix typoNikita Popov2020-08-271-1/+1
| | | | | | | | This was supposed to include the header, not the C file...
* | Generate execute corpus in generate_all.phpNikita Popov2020-08-273-1/+5
| | | | | | | | And add crypt() to the function blacklist, it can be very slow.
* | Add experimental "execute" fuzzerNikita Popov2020-08-277-58/+160
| | | | | | | | | | | | | | This is an end-to-end fuzzer that executes arbitrary PHP code. We replace the executor with a finite-step executor to avoid getting stuck in loops or recursion.
* | sapi/fpm/config.m4: check for libapparmor's aa_change_profile()Kees Cook2020-08-241-1/+1
| | | | | | | | | | | | | | | | The fpm code actually uses aa_change_profile(), not change_hat(). Test for the correct function. (libapparmor always has both, so this is just a correctness fix.) Closes GH-6037.
* | ensure installed ini don't interfereRemi Collet2020-08-211-1/+1
| |
* | Switch to mime-db as source of extension => MIME mapNikita Popov2020-08-132-28/+210
| | | | | | | | | | | | | | | | | | | | | | | | The Apache MIME type map is not actively maintained anymore, so this switches to jshttp/mime-db, which seems to be the de-facto standard in this area now. This avoid the need to patch in our own MIME types over time. The preference algorithm is based on: https://github.com/jshttp/mime-types/blob/47b62ac45e9b176a2af35532d0eea4968bb9eb6d/index.js#L154 Closes GH-5764.
* | Small CS fixNyholm2020-08-121-6/+12
| | | | | | | | | | | | | | The comments were incorrectly aligned. Fix this by dropping the alignment and moving the comments before the declarations. Closes GH-5975.