forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 1
Ext url6 test #7
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
Open
kocsismate
wants to merge
169
commits into
master
Choose a base branch
from
ext-url6-test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
Relates to php#14461 and https://wiki.php.net/rfc/url_parsing_api Co-authored-by: Niels Dossche <[email protected]> Co-authored-by: Tim Düsterhus <[email protected]>
> PHP Warning: Undefined variable $code in build/gen_stub.php on line 5322 Introduced in php#18735.
This allows a cheaper exception check and also does not need a release call. This shrinks concat_function() on x86-64 with GCC 15.1.1 from 3443 bytes to 3332 bytes.
It's possible to return a reference from __toString(), but this is not handled and results in a (confusing) error telling that the return value must be a string. Properly handle this by unwrapping the reference. Closes phpGH-18810.
* PHP-8.4: cli: Fix tests/bug80092.phpt expectation for `PHP_BUILD_PROVIDER` (php#18824)
This hack not only breaks the handling of custom allocators, but also breaks if zend_alloc is compiled with USE_CUSTOM_MM. This hack is just no good, if you want leak information then use ASAN. Closes phpGH-18813.
* PHP-8.3: Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0
* PHP-8.4: Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0
…ons.h(75): error C2122: 'message': prototype parameter in name list illegal INTERNAL_FUNCTION_PARAMETERS is defined in zend.h, but not included in zend_exceptions.h (and it shouldn't). Expand the macro to fix the compile issue.
We can avoid creating temporary strings, and then reparsing them into numbers with zend_symtable_update() by using zend_hash_index_update() directly. For the following benchmark on an i7-4790: ```php $file = str_repeat('A', 100000); for ($i=0;$i<100;$i++) unpack('C*',$file); ``` I get: ``` Benchmark 1: ./sapi/cli/php y.php Time (mean ± σ): 85.8 ms ± 1.8 ms [User: 74.5 ms, System: 10.4 ms] Range (min … max): 83.8 ms … 92.4 ms 33 runs Benchmark 2: ./sapi/cli/php_old y.php Time (mean ± σ): 318.3 ms ± 2.7 ms [User: 306.7 ms, System: 9.9 ms] Range (min … max): 314.9 ms … 321.6 ms 10 runs Summary ./sapi/cli/php y.php ran 3.71 ± 0.08 times faster than ./sapi/cli/php_old y.php ``` On an i7-1185G7 I get: ``` Benchmark 1: ./sapi/cli/php test.php Time (mean ± σ): 60.1 ms ± 0.7 ms [User: 47.8 ms, System: 12.0 ms] Range (min … max): 59.2 ms … 63.8 ms 48 runs Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options. Benchmark 2: ./sapi/cli/php_old test.php Time (mean ± σ): 220.8 ms ± 2.2 ms [User: 209.6 ms, System: 10.7 ms] Range (min … max): 218.5 ms … 224.5 ms 13 runs Summary ./sapi/cli/php test.php ran 3.67 ± 0.06 times faster than ./sapi/cli/php_old test.php ```
If s is not NULL, the length can't be <= 0 because we at least append `spkac` in the string, which is non-empty. I noticed this condition because if it were actually possible to execute, then it would leak memory.
They serve no purpose and are just confusing
And use char instead of widening to int for no reason
Since 2b38384 references are handled properly by the Zend API, so we can simplify the callers by removing reference handling from there.
The strings we encounter are either interned in which case the persistent bool doesn't matter; or they're temporary as the code already assumes that anyway. This patch shrinks the function from 3332 bytes to 3173 bytes on x86-64 with GCC 15.1.1.
Turns out that the instrumentation added for gcov can change inlining decisions of the compiler, which results in a mismatch between the profile data CFG and the actual generated CFG between compiles. There are two functions that suffer from this issue: 1. _PHP_XXH3_Init: Removing the inline hint fixes this one. In fact, always inlining this makes no sense as there's no real opportunity for specialising. It just bloats the binary and increases I$ pressure. So besides fixing this issue it's beneficial on its own to drop the attribute. 2. PHP_XXH3_128_Final: Sometimes XXH128_canonicalFromHash gets inlined and sometimes not. Make sure it gets always inlined. Closes phpGH-18814.
* PHP-8.3: Fix phpGH-14551: PGO build fails with xxhash
* PHP-8.4: Fix phpGH-14551: PGO build fails with xxhash
available since 3.41.0 we can reprepare a statement in either explain, explain query plan or the usual prepared mode. close phpGH-18829
checks if the prepared statement had been fetched but did not complete yet. close phpGH-18843
This test breaks under file cache (because the opcodes are not dumped when ran with a primed cache). run-tests.php --file-cache-* automatically skips all ext/opcache tests, so move it there.
The indentation is also wrong (using spaces instead of tabs), but this should be fixed in a separate commit.
When the array functions perform their operation in-place, the `@refcount 1` annotation is wrong and causes a failure under `ZEND_VERIFY_FUNC_INFO`. The test file tests all functions that have the in-place optimization, even those that didn't have the refcount annotation, just to prevent future regressions. Closes phpGH-18929.
* PHP-8.3: Fix RCN violations in array functions
* PHP-8.4: Fix RCN violations in array functions
This is a continuation of phpGH-18927 to fix CI for windows-2022
This is a continuation of phpGH-18927 to fix CI for windows-2022
* PHP-8.2: Fix CI for windows-2022
* PHP-8.3: Fix CI for windows-2022
* PHP-8.4: Fix CI for windows-2022
Co-authored-by: Tim Düsterhus <[email protected]>
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.