forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
merge #2
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
merge #2
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
RFC 3986 technically allows arbitrarily large integers as port numbers, but our implementation is unable to deal with that, since it expects the port to fit `zend_long`, reject those explicitly instead of misinterpreting them.
* Remove include "sanity check" to get a better error message Instead of rejecting directories / non-regular files early with a generic error, we should just accept them and error later when a read is attempted. This is more general and will generate a better error message on Linux. On Windows, the error remains the same as before. * Update error message to include include_path fix format for include path --------- Co-authored-by: Joe Watkins <krakjoe@php.net>
Building opcache into the main executable breaks opcache.huge_code_pages, as we were relying on the fact that accel_remap_huge_pages() is not in the same mapping as the main text segment. Here I ensure that accel_remap_huge_pages() is placed out of the text segment, and remap only the text segment. This approach is used in [1]. Closes GH-19388. [1] https://github.com/intel/iodlr/blob/676bb7dec378d561e4d900fbdaed6ce8dbe449a1/large_page-c/large_page.c#L260.
Signed-off-by: Benstone Zhang <benstonezhang@gmail.com> Closes GH-13443
This seems like an issue that might be potentially causing issues like GH-12901. The problem is that libs like libcurl, libldap and others use the default OpenSSL version so this might result in linking issues. The fact that OpenSSL 1.1.1 was actually good that we were able to have it in the pipeline but this is just not right setup so we should find another way how to test it at least in nightly. Closes GH-19472
* PHP-8.4: Update IR
This fixes segfault becuse of UAF in ext/standard/tests/gh14643_longname.phpt
* PHP-8.4: Cleanup SSA(s) in case of fatal error during tracing JIT
We need to emit the EXT_STMT opcode before we compile the call, so that we attach the line number of where the right hand pipe operator starts. We also do not need to reset the line number anymore. The following code shows where these EXT_STMTs are introduced. ``` <?php /* EXT_STMT */ $myString = "<Hello World>"; $result = /* EXT_STMT */ $myString |> /* EXT_STMT(!0:$myString) */ \htmlentities(...) |> /* EXT_STMT($4) */ \str_split(...) |> /* EXT_STMT($6) */ (fn($x) => array_map(strtoupper(...), $x)) |> /* EXT_STMT($9) */ (fn($x) => join( ', ', $x)); /* EXT_STMT */ echo $result, /* EXT_STMT */ "\n"; ```
…rnal_encoding()` in tests (#19663) Moves the usage of `mb_internal_encoding()` to INI section for the tests not testing the encoding/function itself, but the other mbstring/iconv functions.
If (brake->type+1) exeeds 30, we have undefined behavior and won't actually remove the relevant bit. See GH-19633
* PHP-8.3: Fix date_sunrise() and date_sunset() with partial-hour UTC offset
* PHP-8.4: Fix date_sunrise() and date_sunset() with partial-hour UTC offset
* PHP-8.3: Fix RC assertion in fpm when php_admin_value setting fails
* PHP-8.4: Fix RC assertion in fpm when php_admin_value setting fails
… ord() (#19440) RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_string_which_are_not_one_byte_long_to_ord Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
In the macOS 26 SDK, xmlFree is defined as a macro for free. This causes issues where a same-named variable is used. Renaming the variable to should_free resolves the issue. See: $ grep -B4 -A2 -n "#define xmlFree(" "Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.sdk/usr/include/libxml/globals.h" 261-#if defined(LIBXML_HAS_DEPRECATED_MEMORY_ALLOCATION_FUNCTIONS) 262-#define xmlMalloc(size) malloc(size) 263-#define xmlMallocAtomic(size) malloc(size) 264-#define xmlRealloc(ptr, size) realloc((ptr), (size)) 265:#define xmlFree(ptr) free(ptr) 266-#define xmlMemStrdup(str) strdup(str) 267-#endif Fixes: ``` In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/libxml/xmlIO.h:117, from /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/libxml/parser.h:813, from /private/tmp/php-20250914-13349-uqsk5o/php-8.4.12/ext/dom/php_dom.h:29, from /private/tmp/php-20250914-13349-uqsk5o/php-8.4.12/ext/dom/attr.c:26: /private/tmp/php-20250914-13349-uqsk5o/php-8.4.12/ext/dom/attr.c: In function 'dom_compare_value': /private/tmp/php-20250914-13349-uqsk5o/php-8.4.12/ext/dom/attr.c:208:17: error: called object 'free' is not a function or function pointer 208 | xmlFree(attr_value); | ^~~~~~~ /private/tmp/php-20250914-13349-uqsk5o/php-8.4.12/ext/dom/attr.c:204:14: note: declared here 204 | bool free; | ^~~~ make: *** [ext/dom/attr.lo] Error 1 ``` Closes GH-19832. Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
* PHP-8.4: Fix naming clash with libxml macro
It is illegal to construct out-of-bound pointers, even if they are not dereferenced. The current bound checks rely on undefined behaviour. Fix this by introducing convenience macros that check the remaining length.
The loop checks against `p` but increases `p2`. I don't see the point of having 2 separate variables, so use `p` instead to correct the bounds check and simplify the code in the process.
…ile size We change the order of operations such that the file size check cannot overflow in the for loop. This prevents infinite loops. We also add an overflow check at the end of the loop body to prevent the addition of offset and box.size from overflowing.
…ures can cause a crash Due to user closures, the `fbc` address isn't unique if the memory address is reused. We need to distinguish using a unique key, and we choose arg_info such that it can be reused across different functions. Closes GH-19654.
* PHP-8.3: Fix GH-19653: Closure named argument unpacking between temporary closures can cause a crash
* PHP-8.4: Fix GH-19653: Closure named argument unpacking between temporary closures can cause a crash
…ching backtrace (#19842)
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.