forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from php:master #6
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
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
Add IntlDatePatternGenerator class per RFC https://wiki.php.net/rfc/intldatetimepatterngenerator.
The implementation for functions and operators is shared. However, we should not be generating argument errors for operators.
* PHP-8.0: Fix bug #81119
9a1da9f missed this part.
We need to look for the right file. To avoid total confusion, we also rename the variables; however, the right solution would have been to drop the version suffixes, since they don't help (major + minor maybe, but not major only).
* PHP-8.0: Fix #81120: PGO data for main PHP DLL are not used
On IBM i, getifaddrs is available renamed as Qp2getifaddrs; freeifaddrs and struct ifaddr follow a similar fate. I assume this is in case AIX decides to add it (as if). As such, just use the same implementation, but rename the standard ones to the IBM i definitions and include its header.
* 7136: Enable net_get_interfaces on IBM i PASE
* PHP-8.0: Enable net_get_interfaces on IBM i PASE
* PHP-8.0: fix bad refactor of #7136
Per https://docs.travis-ci.com/user/billing-overview/#partner-queue-solution it's possible to use arm64, ppc64le and s390x without consuming credits, as these are part of "Partner Queue Solution". Try running these jobs unconditionally, rather than as cron jobs. This also requires switching from arm64-graviton2 back to arm64, as this doesn't seem to extend to arm64-graviton2.
This is an automated migration of most SKIPIF extension_loaded checks.
There's some kind of special characters at the end of the name
Historically it was necessary to use a separate server to test curl against. For many years now we use the builtin server instead. I don't believe there's much point in retaining this functionality.
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
The extension information needs to be fetched using the cli binary, not the cgi binary.
The result == op1 check did not work properly here, because op1 was &op1_copy at this point. Move the division by zero reporting out of the _base function, so it can check the original op1.
* PHP-8.0: Fix leak on div by zero compound assignment with coercion
We use `ASN1_INTEGER_set_int64()` if supported[1], to avoid the truncation of the integer. [1] <https://www.openssl.org/docs/man1.1.0/man3/ASN1_INTEGER_set_int64.html#HISTORY> Closes GH-7209.
* PHP-7.4: Fix #52093: openssl_csr_sign truncates $serial
* PHP-8.0: Fix #52093: openssl_csr_sign truncates $serial
In this case we ended up creating an ASSIGN_OBJ_REF with VAR result operand, which was not freed. Fix this by implementing assign_ref_znode the same was as assign_znode, i.e. performing an assignment with result and then freeing the result, which will result mark the result as UNUSED. This is more robust than the special handling for result == NULL that was used before. This fixes one of the issues reported in bug #81190.
* PHP-7.4: Fix leak on foreach by ref assign to property
* PHP-8.0: Fix leak on foreach by ref assign to property
Move the result initialization before HANDLE_EXCEPTION(), the actual value doesn't matter. This fixes one of the issues report in bug #81190.
The analysis in the bug report wasn't correct (at least not in this case -- there may still be a more general problem here), the issue was that write_property returned the original variable_ptr rather than the zend_assign_to_variable() return value, which will DEREF the variable before overwriting it.
* PHP-7.4: Fixed bug #80173
* PHP-8.0: Fixed bug #80173
We should be using the result of zend_assign_to_variable() here, which will deref prior to potential freeing. Fixes oss-fuzz #29899.
* PHP-7.4: Fix return value of wrong fucntion by-ref assign
* PHP-8.0: Fix return value of wrong fucntion by-ref assign
tsrm_realpath() internally always allocates a string. If the out parameter is provided it gets copied there and freed. What we were doing here was to first copy the path from the allocated string to a stack buffer, and then copy it from the stack buffer to a zend_string. We might as well save one copy and one buffer.
TMPVAR operands are destroyed using zval_ptr_dtor_nogc(), because they usually cannot contain cycles. However, there are some rare exceptions where this is possible, e.g. unserialize() return value. In such cases we rely on the producing code to root the value. If a GC run occurs between the rooting and consumption of the value, we would end up leaking it. To avoid this, root all live TMPVAR values after a GC run. Closes GH-7210.
Fixes bug62904.phpt under clang ubsan.
Previously this caused a null pointer dereference if the value argument was not provided.
* PHP-8.0: Add missing error condition to stream_context_set_option()
This will make tests much faster, since one of our tests involves lossless conversion.
As suggested on the patch discussion, adding init/end macros. Plus, prefixed the new functions with php_ to avoid possible symbol conflicts. Signed-off-by: Anatol Belski <[email protected]>
pull bot
pushed a commit
that referenced
this pull request
Jul 3, 2021
The following opcodes would be generated: ... BB1: 0003 JMP BB3 BB2: 0004 INIT_FCALL 1 96 string("chr") 0005 #10.T3 [long] = SR #3.CV0($int) [long] #7.CV2($i) ... 0006 #11.T4 [long] RANGE[0..127] = BW_AND #10.T3 [long] ... 0007 #12.T3 [long] RANGE[128..255] = BW_OR #11.T4 [long] ... 0008 SEND_VAL #12.T3 [long] RANGE[128..255] 1 0009 #13.V3 [ref, rc1, rcn, any] = DO_ICALL 0010 ASSIGN_OP (CONCAT) #6.CV1($out) [rc1, rcn, string] 0011 ADD #7.CV2($i)... int(7) #7.CV2($i) ... -> #15.CV2($i) ... BB3: 0012 #8.T4 [long] = SR #3.CV0($int) #7.CV2($i) [long, double] 0013 #9.T3 [bool] RANGE[0..1] = IS_SMALLER int(128) #8.T4 0014 JMPNZ #9.T3 [bool] RANGE[0..1] BB2 ... Main changes are: 1. SR opcode covers new path in function zend_jit_long_math_helper(). 2. BW_AND and BW_OR opcodes are supported. See macro LONG_OP. 3. Function zend_jit_concat_helper() is added to support ASSIGN_OP opcode. Speficically, CONCAT and FAST_CONCAT is supported for statements "$out .= ...". 4. New path is covered in function zend_jit_cmp_long_long() by IS_SMALLER opcode. 5. New path is covered in macros ZVAL_PTR_DTOR and ZVAL_DTOR_FUNC when leaving.
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.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )