Commit Graph

117058 Commits

Author SHA1 Message Date
Máté Kocsis
01a50778d1
Use RETURN_THROWS() after zend_throw_exception() in most of the extensions 2020-01-02 10:56:18 +01:00
Nikita Popov
a6486088f8 Switch hash() function to use fastzpp
For short inputs ZPP can be a large fraction of the hash()
execution time.
2020-01-02 10:06:16 +01:00
Nikita Popov
7c787e56b0 Switch php_hash_fetch_ops() to use zend_string
This has two advantages: If the string is already lowercase, we
do not need to copy it, and it will hopefully match the interned
string name of the hash, making the comparison more efficient.
2020-01-02 10:05:12 +01:00
Tyson Andre
a9c04aee67 Always delete tempfile created by ftruncate test.
The ftruncate() test will fill up the disk when the disk has less than
2GB of space left, on some systems.
I think it expands the file to less than 2GB, then returns an error code,
and the file remains at the larger size.

Because the disk is full, the `--CLEAN--` script can't be saved to
`ftruncate_bug76422.clean.php` to be executed, and the cleanup can't be run.
Subsequent tests also fail to run.

Closes GH-5043
2020-01-01 11:20:32 -05:00
Máté Kocsis
349a286461
Use RETURN_THROWS() after zend_throw_error() 2020-01-01 16:42:30 +01:00
Máté Kocsis
9099dbd961
Use RETURN_THROWS() after zend_type_error() 2020-01-01 14:23:21 +01:00
Máté Kocsis
12ce73a5bb
Use RETURN_THROWS() after zend_value_error() 2019-12-31 16:58:15 +01:00
Máté Kocsis
817605917b
Use RETURN_THROWS() during ZPP in the remaining extensions
In reflection, sodium, and SPL
2019-12-31 16:33:02 +01:00
Christoph M. Becker
062744fbdf Merge branch 'PHP-7.4'
* PHP-7.4:
  [ci skip] Revert "Add test case for bug #78883"
2019-12-31 14:27:45 +01:00
Christoph M. Becker
8d2b20db58 [ci skip] Revert "Add test case for bug #78883"
This reverts commit 09e76cbe6d, because
the test fails reliably on AppVeyor.  This needs closer investigation.
2019-12-31 14:27:16 +01:00
Christoph M. Becker
f7eb8141c4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add test case for bug #78883
2019-12-31 13:09:57 +01:00
Christoph M. Becker
09e76cbe6d Add test case for bug #78883
The actual test has been provided by divinity76.
2019-12-31 13:09:27 +01:00
Christoph M. Becker
d694edaee4 Fix erroneous change 2019-12-31 12:24:01 +01:00
Christoph M. Becker
e0b288020b Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove superfluous compiler option
2019-12-31 12:00:48 +01:00
Christoph M. Becker
4f0e5c8dd9 Remove superfluous compiler option
`-fsanitize-address-use-after-scope` is the default as of clang 5.0.0,
and we don't allow to enable ASan for older versions anyway.
2019-12-31 12:00:10 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Máté Kocsis
d9ac1ca8de
Use ZEND_THROWS() during ZPP in the GD, gettext, GMP, and hash extensions 2019-12-31 00:21:38 +01:00
Máté Kocsis
382a038e05
Use ZEND_THROWS() during ZPP in enchant, exif, fileinfo, filter, and FTP extensions 2019-12-31 00:21:37 +01:00
Máté Kocsis
2f7309b1e9
Use RETURN_THROWS() during ZPP in the date, dba and dom extensions 2019-12-31 00:21:37 +01:00
Máté Kocsis
76c45f35f5
Use RETURN_THROWS() during ZPP in bz2, calendar, com_dotnet extensions 2019-12-31 00:21:37 +01:00
Nikita Popov
3262c28d5c Merge branch 'PHP-7.4'
* PHP-7.4:
  Also propagate include exceptions in opcache
  Make url_stats in resolve_path quiet
2019-12-30 23:22:39 +01:00
Nikita Popov
22e9f9fe4d Also propagate include exceptions in opcache 2019-12-30 23:22:26 +01:00
Nikita Popov
003be875e4 Make url_stats in resolve_path quiet
These stats are used to check whether the file exists -- they
should not generate errors. Having the flag set is particularly
important for custom stream wrappers.
2019-12-30 23:22:26 +01:00
Christoph M. Becker
1ff6911d6a Merge branch 'PHP-7.4'
* PHP-7.4:
  Avoid undefined behavior
2019-12-30 23:18:34 +01:00
Christoph M. Becker
98df5c97f4 Avoid undefined behavior 2019-12-30 23:17:39 +01:00
Nikita Popov
d5c886ab7d Merge branch 'PHP-7.4'
* PHP-7.4:
  Properly propagate url_stat exceptions during include
2019-12-30 22:57:07 +01:00
Nikita Popov
f77747b06c Properly propagate url_stat exceptions during include
Make sure we abort operations early, and that we don't emit
additional warnings or errors if an exception has been thrown.
2019-12-30 22:56:42 +01:00
Christoph M. Becker
48b44612d4 Fix typo 2019-12-30 18:32:52 +01:00
Christoph M. Becker
55fd97c576 Fix #78790: mysqli_get_client_info() expects exactly 0 parameters, 1 given
Although the `mysqli` parameter is unused, it had been accepted so far,
and the documentation even claims that parameter would be required.  To
not break BC, we allow it again.
2019-12-30 17:40:16 +01:00
Máté Kocsis
e1b57310b1
Use RETURN_THROWS() during ZPP in main, sapi, win32, and Zend 2019-12-30 17:38:10 +01:00
Máté Kocsis
31cf9a7ea9
Use RETURN_THROWS() when an exception is thrown
Closes GH-5036
2019-12-30 17:38:10 +01:00
Nikita Popov
d21ad4d955 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79046
2019-12-30 17:24:16 +01:00
Nikita Popov
d1537e506e Fixed bug #79046 2019-12-30 17:23:53 +01:00
Christoph M. Becker
1ab9d626d1 Fix typo 2019-12-30 17:21:50 +01:00
Máté Kocsis
e34a1f9289
Convert zend_parse_parameters_none() to fast ZPP in standard lib
Closes GH-5037
2019-12-30 15:28:37 +01:00
Christoph M. Becker
e57b2b9465 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79040: Warning Opcode handlers are unusable due to ASLR
2019-12-30 15:18:25 +01:00
Christoph M. Becker
94063619a0 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79040: Warning Opcode handlers are unusable due to ASLR
2019-12-30 15:17:41 +01:00
Christoph M. Becker
0cecf83b26 Fix #79040: Warning Opcode handlers are unusable due to ASLR
We must not use the same shared memory OPcache instance for different
SAPIs, since their memory layout is different.  To avoid this, we add
the SAPI name (truncated to at most 20 characters) to the names of the
memory base file, the mutex and the file mapping.
2019-12-30 15:12:58 +01:00
Wouter Wijsman
f13d0a72d5 Add FILTER_VALIDATE_BOOL as alias for FILTER_VALIDATE_BOOLEAN
Both filters are equivalent, but FILTER_VALIDATE_BOOL uses our
canonical name for the type (the only one permitted in type
declarations for example), so the new name is preferred long
term.

The old name may be deprecated in the future, but no specific
timeline is planned.
2019-12-30 14:18:03 +01:00
Nikita Popov
6c6d36bb94 Fix SSA construction for ADD_ARRAY_ELEMENT in RC_INFERENCE mode
This was broken in cc29cbe80c.
2019-12-30 13:29:32 +01:00
Nikita Popov
32fbd2489f Regenerate stubs
Looks like these GD changes got lost along the way...
2019-12-30 12:27:31 +01:00
Nikita Popov
d8bd113b51 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add test for bug #79031
  Revert "Increase serialize_lock while decoding session"
2019-12-30 11:31:56 +01:00
Nikita Popov
fcaf7cbd64 Add test for bug #79031
Fixed by preceding revert.
2019-12-30 11:31:27 +01:00
Nikita Popov
ed3811e781 Revert "Increase serialize_lock while decoding session"
This reverts commit b8ef7c35ab.

See bug #79031. The semantics of serialize locking aren't quite
correct right now, and the use of the lock in this particular
place makes us hit the issue in a common case. I'm reverting this
commit for PHP 7.4 and will try to fix this properly for PHP 8,
as I believe it will require ABI breakage.
2019-12-30 11:27:13 +01:00
Christoph M. Becker
e1559b51cd Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing skipif clause
2019-12-28 11:02:03 +01:00
Christoph M. Becker
935a61d034 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing skipif clause
2019-12-28 11:01:22 +01:00
Christoph M. Becker
1aa419dcdc Add missing skipif clause 2019-12-28 11:00:37 +01:00
Christoph M. Becker
86675dd3f9 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79033: Curl timeout error with specific url and post
2019-12-28 10:49:56 +01:00
Christoph M. Becker
6d1dff6f3d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79033: Curl timeout error with specific url and post
2019-12-28 10:48:59 +01:00
Christoph M. Becker
c47b18a222 Fix #79033: Curl timeout error with specific url and post
We must not set an empty mime structure as `CURLOPT_MIMEPOST`; instead
we set it to `NULL` if `CURLOPT_POSTFIELDS` has been set to an empty
array.
2019-12-28 10:47:03 +01:00