1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Commit Graph

52705 Commits

Author SHA1 Message Date
Christoph M. Becker 7e8b3dd542 Add ext/xml stubs 2019-09-03 13:07:20 +02:00
Nikita Popov 9d4a9ad0c7 Merge branch 'PHP-7.4' 2019-09-03 12:28:35 +02:00
Nikita Popov 518c651c66 Avoid pointer UB in strip_header
Don't calculate header_start if lc_header_start is NULL, as we're
going to overflow the address space in that case.
2019-09-03 12:28:18 +02:00
Nikita Popov 265af40a0a Use unsigned subtraction in php_random_int()
This subtraction may overflow the signed domain, which is UB. Use
an unsigned subtraction instead.
2019-09-03 12:28:18 +02:00
Nikita Popov 52d31bf139 Don't perform coercions in internal func return type assertion
The returned value must match the specified type exactly, as we
can't perform any coercions in non-debug builds.

Fix incorrect stub for easter_date() that slipped through the
assertion for this reason...
2019-09-03 12:16:04 +02:00
Nikita Popov 597a5da027 Support computing func info from ret arg info for internal funcs 2019-09-03 10:32:47 +02:00
Nikita Popov 3cca014ce4 Remove duplicate func info for array_key_first/last
Looks like this was already added in master separately...
2019-09-03 10:31:39 +02:00
Nikita Popov d4a7d17b9a Merge branch 'PHP-7.4' 2019-09-03 09:58:29 +02:00
Tyson Andre 4de8503c22 Add missing opcache return info for ext/standard.
array_key_first/last returns null for invalid args,
wrong argument counts, and empty arrays.

random_bytes returns a string or throws.
2019-09-03 09:57:51 +02:00
Nikita Popov d440a3cddb Merge branch 'PHP-7.4' 2019-09-03 09:53:51 +02:00
Tyson Andre 1a905bcb1e Add new missing functions from ext/hash 2019-09-03 09:53:41 +02:00
Nikita Popov 53fdcd718b Merge branch 'PHP-7.4' 2019-09-03 09:50:23 +02:00
Nikita Popov c0e9b1532e Add zpp check to spl_classes() 2019-09-03 09:50:08 +02:00
Nikita Popov 2bfbb16ff2 Merge branch 'PHP-7.4' 2019-09-03 09:44:09 +02:00
Nikita Popov 5acedabfc0 Clarify failure behavior of spl_iterator_apply()
It only fails if it throws, in which case it is meaningless to
set a return value.
2019-09-03 09:43:22 +02:00
Tyson Andre 149588280b Fix opcache optimizer info for time_nanosleep (again)
Fixes my earlier PR #4617

If I remember correctly,
The F0 macro is used for return values that are guaranteed to not be
reference counted.
The F1 macro is used for return values that may have up to 1 reference
(i.e. MAY_BE_RC1).

I didn't notice that time_nanosleep needed to be F1 since it could
return an array, and that array is reference counted.
2019-09-03 09:31:01 +02:00
Christoph M. Becker 2b061654bf Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing argument checks
2019-09-03 09:28:48 +02:00
Christoph M. Becker de643aaa46 Add missing argument checks
These functions don't expect any arguments, so we check that none are
given.
2019-09-03 09:27:55 +02:00
Nikita Popov 7f78f839dc php_stream_from_zval can no longer return false 2019-09-03 09:25:50 +02:00
Nikita Popov 3ac0f42c40 Merge branch 'PHP-7.4' 2019-09-03 09:24:20 +02:00
Nikita Popov 632708ac02 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-03 09:24:05 +02:00
Nikita Popov d66e0f165d Merge branch 'PHP-7.2' into PHP-7.3 2019-09-03 09:23:55 +02:00
Tyson Andre 9c3b7ccda5 Fix opcache return type for hash_update_stream
It can return false if the resource type is wrong.

```
php > var_export(hash_update_stream(hash_init('md5'),
        imagecreate(1,1)));

Warning: hash_update_stream(): supplied resource is not a valid stream
resource in php shell code on line 1
false
```

The return types were initially added in
c88ffa9a56
2019-09-03 09:23:39 +02:00
Christoph M. Becker 7695049b86 Don't explicitly set return value on ZFR failure in ext/xmlwriter
Failing `zend_fetch_resource(2)` throws as of PHP 8.0.0, so explicitly
setting a return value is useless, and also slightly confusing.
2019-09-03 09:17:08 +02:00
Christoph M. Becker 489dec18fc Add ext/xmlwriter stubs 2019-09-03 09:11:42 +02:00
Dmitry Stogov 0581508ba4 Fixed pow() function info 2019-09-02 21:44:10 +03:00
Nikita Popov 4fc4249d24 Make ReflectionType an abstract class
This is never instantiated directly, only child classes are used.
2019-09-02 15:38:56 +02:00
Nikita Popov bdf2cd7508 Move isBuiltin() method from ReflectionType to ReflectionNamedType
This method only makes sense for single types, e.g. it would be
meaningless for union types.

Note that we always return ReflectionNamedType right now, so this does
not break compatibility for code using any currently existing types.
2019-09-02 14:59:31 +02:00
Nikita Popov d19ecd0f33 Fix typo in type 2019-09-02 10:55:51 +02:00
George Peter Banyard d0754b86b1 Promote warnings to errors in substr_count() 2019-08-31 23:37:04 +02:00
George Peter Banyard 0240b903c5 Promote warnings to errors in substr_compare() 2019-08-31 23:34:24 +02:00
George Peter Banyard c072ef71ee Merge branch 'PHP-7.4'
* PHP-7.4:
  Drop E_STRICT notice in mysqli extension
2019-08-31 23:17:21 +02:00
George Peter Banyard e895e96286 Drop E_STRICT notice in mysqli extension 2019-08-31 23:14:10 +02:00
Nikita Popov ec9297592e Check zpp before other errors in SoapServer::addSoapHeader() 2019-08-30 17:03:25 +02:00
Nikita Popov 82d9f14532 Merge branch 'PHP-7.4' 2019-08-30 16:37:20 +02:00
Nikita Popov 1e4cc5bf0b Fix file clashes in copy tests
Create the "*" file in a sub-directory rather than the main test
directory, so that it's different for each test.
2019-08-30 16:36:49 +02:00
Nikita Popov c217e31d0d Merge branch 'PHP-7.4' 2019-08-30 16:10:11 +02:00
Nikita Popov 2f67f32eaa Remove bogus vcwd_open
This is a left-over from the Linux version...
2019-08-30 16:09:55 +02:00
Nikita Popov 24b1c2447c JIT: Fix missing free on JMPZ_EX with op1 == res
We need to free the operand before we overwrite it with the result.
2019-08-30 14:50:22 +02:00
Nikita Popov 65fa6dac19 Add jit_bisect_limit
To help identify which function is being miscompiled.
2019-08-30 14:50:22 +02:00
Christoph M. Becker 39ab4104ed Remove duplicate md5/sha1 implementation
This code was actually unused since its introduction, and since at
least the md5 implementation in the core was completely overhauled,
we're dropping the md5 and sha1 related stuff from ext/hash.
2019-08-30 13:21:48 +02:00
Nikita Popov 69cf535261 Fix func info for chop()
chop() is an alias of rtrim() and may return copied strings, so
should use FN.
2019-08-30 11:18:47 +02:00
Nikita Popov 8239b58bea Fix closure extra args freeing for JIT as well 2019-08-30 10:35:41 +02:00
Nikita Popov 2879ab46c0 Merge branch 'PHP-7.4' 2019-08-30 10:33:12 +02:00
Fabien Villepinte e1afd9b213 Modernize some connectors in tests to remove env key duplication 2019-08-30 10:33:01 +02:00
George Peter Banyard 1f647ab4ca Move and fix scandir related bug test 2019-08-30 09:50:04 +02:00
George Peter Banyard b3d725218d Promote warnings to errors in dir stdlib extension 2019-08-30 09:50:04 +02:00
George Peter Banyard 6c0eb1be33 Promote warnings to errors in assert_options() 2019-08-29 23:10:37 +02:00
George Peter Banyard dd10e70d0c Promote Directory handler warning to error 2019-08-29 23:08:25 +02:00
Nikita Popov 0d8a399afa Merge branch 'PHP-7.4' 2019-08-29 19:07:59 +02:00