forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
sync master #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
sync master #24
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* PHP-8.2: Fix opcache dump varying tmps
* PHP-8.3: Fix opcache dump varying tmps
…ans_sid_hosts (#13892) The hash tables used are allocated via the persistent allocator. When using ini_set, the allocation happens via the non-persistent allocator. When the table is then freed in GSHUTDOWN, we get a crash because the allocators are mismatched. As a side note, it is strange that this is designed this way, because it means that ini_sets persist between requests... Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
The implementation is needlessly obfuscated. It's not immediately clear that MODMULT is a simple modular multiplication, despite its name. Specifically it's not clear which of the parameters is the second factor. Furthermore the stated period is off-by-one: A value of `0` is part of its own chain, thus it may not be included in the period of the underlying generators.
Somehow it wasn't exposed to userland.
For now, working on Linux, FreeBSD >= 13.x and DragonFlyBSD. Handy wrapper to assign an array of cpu ids or to retrieve the cpu ids assigned to a given process. pcntl_setaffinity inserts valid unique cpu ids (within the range of available cpus). Close GH-13893
When the attribute has a single text child, we can avoid an allocating call to libxml2 and read the contents directly. On my i7-4790, I tested the optimization with both the $value and $nodeValue property. ``` Summary ./sapi/cli/php bench_value.php ran 1.82 ± 0.09 times faster than ./sapi/cli/php_old bench_value.php Summary ./sapi/cli/php bench_nodeValue.php ran 1.78 ± 0.10 times faster than ./sapi/cli/php_old bench_nodeValue.php ``` Test code: ``` $dom = new DOMDocument; $dom->loadXML('<root attrib="this is a relatively short text"/>'); $attrib = $dom->documentElement->attributes[0]; for ($i=0; $i<1000*1000; $i++) { $attrib->value; // or nodeValue } ```
…13807) The usage of the current API within an observer handler leads to bugs like https://bugs.xdebug.org/view.php?id=2232. Given two observer handlers, next to each other. The first one is executed. It removes itself. The second observer handler gets moved to the place of the first. The first one returns. The handler in the second slot is fetched, but is now NULL, because the it's now in the slot of the first observer; i.e. the second handler is skipped and the begin/end symmetry guarantee is violated. Providing the next handler to the caller is a zero-cost way to avoid any impact in the paths of zend_observe_fcall_begin/end. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
The situation varies from platform to another, thus taking in account the complexity of it. Close GH-13902
Short-lived regression from 5ce9687. I forgot to add the persistent local flag, so that means that RC_DEBUG will complain. These strings are local to the thread so we can just add the flag to silence the debug checker in this case.
* PHP-8.2: Fix persistent local flag in session url updating (#13905)
* PHP-8.3: Fix persistent local flag in session url updating (#13905)
…3907) also disable tests on travis.
using sched_getcpu under the hood (Linux and FreeBSD). Returns the current cpu id for the current process. For Linux, we need to see beyond the sole presence of the symbol to consider it. Mostly useful, for now, in the cpu affinity context since the os can migrate processes as it sees fits otherwise. Clos GH-13908
* PHP-8.2: Fix GH-13860: Incorrect PHP_STREAM_OPTION_CHECK_LIVENESS case in ext/openssl/xp_ssl.c - causing use of dead socket
* PHP-8.3: Fix GH-13860: Incorrect PHP_STREAM_OPTION_CHECK_LIVENESS case in ext/openssl/xp_ssl.c - causing use of dead socket
…ows (#13906) Probably CP932 environment can't compile. So add /utf-8 flag.
* PHP-8.2: Improve stability of test gh13860.phpt
* PHP-8.3: Improve stability of test gh13860.phpt
* PHP-8.2: Temporary reset filename and lineno override before autoload
* PHP-8.3: Temporary reset filename and lineno override before autoload
This is addon to the GH-13727 bug fix. When configuring the build with: ./configure CFLAGS=-Werror=strict-prototypes libtool check for parsing nm command would fail: checking command to parse /usr/bin/nm -B output from cc object... failed Upstream libtool has this specific check already fixed. Note that this works only with Autoconf version 2.72 and later and is preparation for future compilers that might have this error enabled by default.
- SIGCKPT checkpoint and continue. - SIGCKPTEXIT checkpoint and exit. Close GH-14011
`zend_strtod.c` uses a global state (mostly an allocation freelist) protected by a mutex in ZTS builds. This state is used by `zend_dtoa()`, `zend_strtod()`, and variants. This creates a lot of contention in concurrent loads. `zend_dtoa()` is used to format floats to string, e.g. in sprintf, json_encode, serialize, uniqid. Here I move the global state to the thread specific `executor_globals` and remove the mutex. The impact on non-concurrent environments is null or negligible, but there is a considerable speed up on concurrent environments, especially on Alpine/Musl.
* refs/heads/PHP-8.2: PHP-8.2 is now for PHP 8.2.20-dev # Conflicts: # Zend/zend.h # configure.ac # main/php_version.h
* refs/heads/PHP-8.3: PHP-8.2 is now for PHP 8.2.20-dev
Because the default characters are defined in the stub file, and the stub file is UTF-8 (typically), the characters are encoded in the string as UTF-8. When using a different character encoding, there is a mismatch between what mb_trim expects and the UTF-8 encoded string it gets. One way of solving this is by making the characters argument nullable, which would mean that it always uses the internal code path that has the unicode codepoints that are defaulted actually stored as codepoint numbers instead of in a string. Co-authored-by: @ranvis
We have access to this information, so propagate it instead of calling strlen(). This also removes the newly introduced _ex() variant.
This isn't necessary because the cases where we use it will always succeed because the properties always have the type string|null.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.