summaryrefslogtreecommitdiff
path: root/main
Commit message (Collapse)AuthorAgeFilesLines
* Fix #78883: fgets(STDIN) fails on WindowsChristoph M. Becker2019-12-021-14/+20
| | | | | | | | We add the `is_seekable` member to `php_stdio_stream_data`, and prefer that over `is_pipe`, since the latter is simply a misnomer. We keep `is_pipe` for now for Windows only, though, because we need special support for pipes there. We also fix the misaligned bitfield which formerly took 33 bit.
* Fix bug #77930: Remove mmap limitNikita Popov2019-10-311-6/+0
| | | | | | | | | | | | | | | First, the limitation already doesn't trigger if you copy the whole file (i.e. use copy() or stream_copy_to_stream() and don't specify a length). This happens because length will be 0 at the time of the check and only later calculated based on the file size. This means that we're already completely blowing the length limit for what is likely the most common case, and it doesn't seem like anyone complained about that. Second, the premise of the code comment ("to avoid runaway swapping") seems incorrect to me. Because this performs a file-backed non-private mmap, no swap backing is needed for the mapping. Concerns over "memory usage" are also misplaced, as this is a virtual mapping.
* Fix #78662: stream_write bad error detectionRemi Collet2019-10-111-7/+8
|
* Also check for exception after stream_eofNikita Popov2019-10-101-2/+6
|
* Report error if stream_read is not implementedNikita Popov2019-10-101-18/+19
| | | | | We need to return -1 in this case. Slightly restructure the code to avoid unnecessary conditions.
* Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-10-091-1/+1
|\ | | | | | | | | * PHP-7.3: Fix #78656: Parse errors classified as highest log-level
| * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-10-091-1/+1
| |\ | | | | | | | | | | | | * PHP-7.2: Fix #78656: Parse errors classified as highest log-level
| | * Fix #78656: Parse errors classified as highest log-levelErik Lundin2019-10-091-1/+1
| | |
| | * next is 7.2.25Remi Collet2019-10-081-3/+3
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-10-081-1/+7
|\ \ \ | |/ /
| * | Check for exception after applying stream filtersNikita Popov2019-10-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | This makes the stream opening actually fail, and avoids assertion failures when we tokenize with EG(exception) set. Also avoid throwing an additional warning after an exception has already been thrown.
| * | 7.3.12 is nextChristoph M. Becker2019-10-081-3/+3
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Joe Watkins2019-10-032-6/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix #76859 stream_get_line skips data if used with data-generating filter
| * | Merge branch 'PHP-7.2' into PHP-7.3Joe Watkins2019-10-032-6/+0
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix #76859 stream_get_line skips data if used with data-generating filter
| | * Fix #76859 stream_get_line skips data if used with data-generating filterKonstantin Kopachev2019-10-032-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | stream_get-line repeatedly calls php_stream_fill_read_buffer until enough data is accumulated in buffer. However, when stream contains filters attached to it, then each call to fill buffer essentially resets buffer read/write pointers and new data is written over old. This causes stream_get_line to skip parts of data from stream This patch fixes such behavior, so fill buffer call will append.
| | * Bump for 7.2.24Sara Golemon2019-09-101-3/+3
| | |
| * | PHP 7.3.10RC1 has been taggedChristoph M. Becker2019-09-101-3/+3
| | |
| * | Fix versionChristoph M. Becker2019-09-091-3/+3
| | | | | | | | | | | | 7.3.10 is next, not 7.3.11.
| * | fix versionStanislav Malyshev2019-09-051-3/+3
| | |
* | | Fixed bug #78506Nikita Popov2019-09-111-18/+16
| | |
* | | Fix pipe detection and stream position handlingNikita Popov2019-09-051-31/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two related changes here: 1. Also check for S_ISCHR/FILE_TYPE_CHAR when checking for pipes, so that we detect ttys as well, which are also not seekable. 2. Always set position=-1 (i.e. ftell will return false) when a pipe is detected. Previously position=0 was sometimes used, depending on whether we're on Windows/Linux and whether the FD or FILE codepath was used.
* | | Update PHP_API_VERSIONDmitry Stogov2019-09-021-1/+1
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-08-301-2/+2
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-08-301-2/+2
| |\ \ | | |/
| | * Fixed bug #78469Sergei Turchanov2019-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fcgi_accept_request function is supposed to call a FastCGI implementation's on_accept hook when entering an "accepting" stage (that is right before calling "accept"). This hook implementation (fpm_request_accepting) updates a worker state to an "accepting" state which is effectively an "Idle" state, and updates counters on the scoreboard of the corresponding pool (idle++, active--). But this is not done when listening for client connections on a named pipe on Windows platform. In that case a combination of ConnectNamedPipe/WaitForSingleObject is used (to be able to catch in_shutdown as far as I understand), but it is nonetheless functionally equivalent to "accept" call. Also by not calling on_hook neither a worker's state is updated to "accepting" state nor scoreboard counters are updated.
| | * Bump for 7.2.23Sara Golemon2019-08-131-3/+3
| | |
| * | Update Oniguruma to 6.9.1Stanislav Malyshev2019-08-251-3/+3
| | |
| * | Next will be 7.3.10Christoph M. Becker2019-08-131-3/+3
| | |
| * | Bump version numbersChristoph M. Becker2019-08-131-3/+3
| | | | | | | | | | | | This should have been done four weeks ago already.
* | | Fix signature and callsAnatol Belski2019-08-271-2/+2
| | |
* | | Replace strncat in filter implementationNikita Popov2019-08-231-2/+3
| | | | | | | | | | | | | | | In this case we already know exactly where we need to write, no need to use strncat at all.
* | | Fixed bug #78406Nikita Popov2019-08-131-2/+10
| | |
* | | Fixed bug #78396Nikita Popov2019-08-121-1/+1
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-07-291-1/+6
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-07-291-1/+6
| |\ \ | | |/
| | * Fix bug #78326Albert Casademont2019-07-291-1/+6
| | | | | | | | | | | | | | | Similar to what fread() does, truncate the stream_get_contents() result if the original buffer was way too large.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-07-291-0/+5
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-07-291-0/+5
| |\ \ | | |/
| | * Fix Zend signals unblockingNikita Popov2019-07-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few parts here: * opcache should not be blocking signals while invoking compile_file, otherwise signals may remain blocked on a compile error. While at it, also protect SHM memory during compile_file. * We should deactivate Zend signals at the end of the request, to make sure that we gracefully recover from a missing unblock and signals don't remain blocked forever. * We don't use a critical section in deactivation, because it should not be necessary. Additionally we want to clean up the signal queue, if it is non-empty. * Enable SIGG(check) in debug builds so we notice issues in the future.
* | | Throw notice for plain wrapper fread/fwrite errorsNikita Popov2019-07-252-5/+20
| | | | | | | | | | | | Similar to what is done for socket read/write errors.
* | | Report errors from stream read and write operationsNikita Popov2019-07-228-117/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Deprecate allow_url_includeNikita Popov2019-07-221-0/+1
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-07-171-9/+6
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-07-171-9/+6
| |\ \ | | |/
| | * Fixed bug #69100Nikita Popov2019-07-171-9/+6
| | |
| | * next is 7.2.22Remi Collet2019-07-161-3/+3
| | |
| | * next is 7.2.21Remi Collet2019-06-111-3/+3
| | |
| | * Bump for 7.2.20Sara Golemon2019-05-141-3/+3
| | |
| | * next is 7.2.19Remi Collet2019-04-161-3/+3
| | |
* | | Avoid duplicate fstat() for includesNikita Popov2019-07-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding a flag to avoid forced fstat for includes. The two fstats will happen back to back and we don't care about a possible invalidation. I was hoping to move this higher up in the stack and make the ISREG check somewhere in fsizer of fixup, but this doesn't really seem to be possible. E.g. an FP stdin handle will not be a regular file but of course needs to be allowed. Additionally custom stream wrappers may not implement this functionality.