summaryrefslogtreecommitdiff
path: root/main
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused READDIR_R lockNikita Popov2021-03-221-1/+0
|
* Use zend_string_equals() API instead of strcmp() in main.cGeorge Peter Banyard2021-03-171-29/+31
|
* Fix CLANG/RELEASE build (this is a workaround for probable bug in CLANG)Dmitry Stogov2021-03-171-5/+1
|
* Change Zend Stream API to use zend_string* instead of char*.Dmitry Stogov2021-03-166-51/+74
| | | | | This allows to eliminate re-calculation of string lenght and hash value. See the detailed list of changes in UPGRADING.INTERNALS.
* Use zend_string* & more legible API for php_get_display_errors_mode()George Peter Banyard2021-03-141-17/+13
|
* Return early on php display error for better legibilityCalison2021-03-141-14/+19
| | | | | | Closes GH-6760 Signed-off-by: George Peter Banyard <girgias@php.net>
* Improve SPL directory and stat() cache using zend_srting* instead of char*Dmitry Stogov2021-02-263-42/+9
|
* Merge branch 'PHP-8.0'Christoph M. Becker2021-02-221-1/+1
|\ | | | | | | | | * PHP-8.0: Fix #75776: Flushing streams with compression filter is broken
| * Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-221-1/+1
| |\ | | | | | | | | | | | | * PHP-7.4: Fix #75776: Flushing streams with compression filter is broken
| | * Fix #75776: Flushing streams with compression filter is brokenChristoph M. Becker2021-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, the `bzip2.compress` filter has the same issue as `zlib.deflate` so we port the respective fix[1] to ext/bz2. Second, there is still an issue, if a stream with an attached compression filter is flushed before it is closed, without any writes in between. In that case, the compression is never finalized. We fix this by enforcing a `_php_stream_flush()` with the `closing` flag set in `_php_stream_free()`, whenever a write filter is attached. This call is superfluous for most write filters, but does not hurt, even when it is unnecessary. [1] <http://git.php.net/?p=php-src.git;a=commit;h=20e75329f2adb11dd231852c061926d0e4080929> Closes GH-6703.
| | * Update versionChristoph M. Becker2021-01-261-3/+3
| | | | | | | | | | | | That appears to have been forgotten for a while.
| * | Prep for 8.0.4Sara Golemon2021-02-171-3/+3
| | |
| * | Next is 8.0.3Gabriel Caruso2021-01-191-3/+3
| | |
* | | Added Inheritance Cache.Dmitry Stogov2021-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new transparent technology that eliminates overhead of PHP class inheritance. PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request. Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking). The patch shows 8% improvement on Symphony "Hello World" app.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-01-193-4/+18
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #42560
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-01-193-4/+18
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fixed bug #42560
| | * Fixed bug #42560sj-i2021-01-193-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check open_basedir after the fallback to the system's temporary directory in tempnam(). In order to preserve the current behavior of upload_tmp_dir (do not check explicitly specified dir, but check fallback), new flags are added to check open_basedir for explicit dir and for fallback. Closes GH-6526.
* | | Replace zend_bool uses with boolNikita Popov2021-01-1512-61/+61
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Make convert_to_*_ex simple aliases of convert_to_*Nikita Popov2021-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, the _ex variants separated the zval first, if a conversion was necessary. This distinction no longer makes sense since PHP 7. The only difference that was still left is that _ex checked whether the type is the same first, but the usage of these macros did not actually distinguish on whether such an inlined check is valuable or not in a given context. Also drop the unused convert_to_explicit_type macros.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2020-12-231-1/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #80384: limit read buffer size
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-12-231-1/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #80384: limit read buffer size
| | * Fix #80384: limit read buffer sizeAdam Seitz2020-12-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of a stream with no filters, php_stream_fill_read_buffer only reads stream->chunk_size into the read buffer. If the stream has filters attached, it could unnecessarily buffer a large amount of data. With this change, php_stream_fill_read_buffer only proceeds until either the requested size or stream->chunk_size is available in the read buffer. Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Closes GH-6444.
| * | Next is 8.0.2Gabriel Caruso2020-12-151-3/+3
| | |
* | | Back memory stream by a zend_stringNikita Popov2020-12-182-72/+43
| | | | | | | | | | | | | | | | | | This allows reusing an existing zend_string inside a memory stream without reallocating. For non-readonly streams, the string will only get separated on write.
* | | Remove unused smax member from memory streamNikita Popov2020-12-181-2/+0
| | |
* | | Merge branch 'PHP-8.0'Christoph M. Becker2020-12-081-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #77069: stream filter loses final block of data
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-12-081-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #77069: stream filter loses final block of data
| | * Fix #77069: stream filter loses final block of dataChristoph M. Becker2020-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading from a stream may return greater than zero, but nonetheless the stream's EOF flag may have been set. We have to cater to this condition by setting the close flag for filters. We also have to cater to that change in the zlib.inflate filter: If `inflate()` is called with flush mode `Z_FINISH`, but the output buffer is not large enough to inflate all available data, it fails with `Z_BUF_ERROR`. However, `Z_BUF_ERROR` is not fatal; in fact, the zlib manual states: "If deflate returns with Z_OK or Z_BUF_ERROR, this function must be called again with Z_FINISH and more output space (updated avail_out) but no more input data, until it returns with Z_STREAM_END or an error." Hence, we do so. Closes GH-6001.
| | * Update version in 7.4 branchDerick Rethans2020-11-071-3/+3
| | |
* | | Merge branch 'PHP-8.0'Nikita Popov2020-11-303-5/+16
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Suppress stream errors in mysqlnd
| * | Suppress stream errors in mysqlndNikita Popov2020-11-303-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqlnd currently sets error_reporting=0 to suppress errors while writing to streams. Unfortunately these errors are still visible to userland error handlers, which is a source of confusion. See for example https://bugs.php.net/bug.php?id=80412. Instead add a stream flag that suppresses the emission of read/write errors in the first place, and set it in mysqlnd. I think it might be useful to have this option for userland as well in the future, but for now this is just an internal mechanism. Closes GH-6458.
| * | 8.0 branch should be prepping for 8.0.1Sara Golemon2020-11-191-3/+3
| | |
* | | Merge branch 'PHP-8.0'Sammy Kaye Powers2020-11-161-0/+5
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fire open observer end handlers after a zend_bailout
| * | Fire open observer end handlers after a zend_bailoutSammy Kaye Powers2020-11-161-0/+5
| | | | | | | | | | | | Closes GH-6377
* | | Merge branch 'PHP-8.0'Christoph M. Becker2020-11-121-7/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Strip trailing line breaks and periods from Windows error messages
| * | Strip trailing line breaks and periods from Windows error messagesChristoph M. Becker2020-11-121-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | PHP error messages should not contain line breaks, so we remove these from the Windows specific error messages. We also remove trailing periods for the same reason. Closes GH-6423.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-10-211-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix invalid memory read on libpath
| * | Fix invalid memory read on libpathtwosee2020-10-211-1/+1
| | | | | | | | | | | | | | | | | | Introduced in 3e33e1e86d15e262cd9e0224a9604e252f5d9284. Closes GH-6362.
* | | Remove IGNORE_URL_WIN macroChristoph M. Becker2020-10-182-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This macro is defined to zero as of PHP 5.0.0, and as the comment indicates, is no longer relevant. Thus, we remove the definition and all usages from the core and bundled extensions. Closes GH-6351.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-10-161-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Properly handle NULL output start filename
| * | Properly handle NULL output start filenameNikita Popov2020-10-161-1/+1
| | |
* | | Remove unused globalNikita Popov2020-10-162-12/+11
| | |
* | | Merge branch 'PHP-8.0'Nikita Popov2020-10-162-6/+16
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Make sure output start filename is not freed early
| * | Make sure output start filename is not freed earlyNikita Popov2020-10-162-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | As filenames are no longer interned, we need to keep a reference to the zend_string to make sure it isn't freed. To avoid a nominal source compatibility break, create a new member in the globals.
* | | Suppress bogus [-Wlogical-op] warning from GCCGeorge Peter Banyard2020-10-103-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Prepare for PHP 8.1Gabriel Caruso2020-10-092-4/+4
|/ / | | | | | | Closes GH-6305.
* | Expose php_during_module_startup() and php_during_module_shutdown()Sammy Kaye Powers2020-10-052-2/+4
| | | | | | | | | | | | This can be handy when trying to determine if it is safe to access request globals amongst other things. Closes GH-6265
* | Prepare for PHP 8.0 RC1Gabriel Caruso2020-09-301-1/+1
| |
* | Fix #78792: zlib.output_compression disabled by Content-Type: image/Christoph M. Becker2020-09-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | Disabling output compression for images has served to fix bug #16109, where zlib compressed images apparently have caused issues with Navigator 4. This shouldn't be an issue with somewhat contemporary browsers. Other than that, this is an arbitrary restriction – why don't we disable the compression for some other media types as well (e.g. video/* and audio/*)? All in all, we should leave that decision to userland. Closes GH-6198.
* | Merge branch 'PHP-7.4'Stanislav Malyshev2020-09-281-1/+3
|\ \ | |/ | | | | | | | | | | | | | | * PHP-7.4: Update UPGRADING Update UPGRADING Update NEWS & UPGRADING Do not decode cookie names anymore Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)