Commit Graph
120415 Commits
Author SHA1 Message Date
Gabriel Caruso 4c0c7f1fd8 Update versions for PHP 8.0.0beta3 php-8.0.0beta3 2020-09-01 17:09:02 +00:00
Gabriel Caruso ea14de77cc Update NEWS for PHP 8.0.0beta3 2020-09-01 17:08:27 +00:00
66c3e900e2 Add zend_observer API
Closes GH-5857.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
2020-09-01 09:59:59 -06:00
Dmitry Stogov bd8e0a96a5 Eliminate useless EG(exception) checks aftr FE_RESET/FE_FETCH 2020-09-01 18:56:47 +03:00
Máté Kocsis f7fbc6333f Add more precise type info for stubs
Closes GH-6005
2020-09-01 16:35:56 +02:00
Dmitry Stogov 1c56b40a5c Eliminate some EX_CALL_INFO() checks 2020-09-01 16:26:29 +03:00
Nikita Popov 88a8ebce6a Merge branch 'PHP-7.4'
* PHP-7.4:
  Check for null EX(func) in write_property
2020-09-01 15:17:28 +02:00
Nikita Popov f92a03627a Check for null EX(func) in write_property
This can happen if zend_call_function inserted a dummy frame,
and we already switched to the dummy frame in leave_helper,
and an exception is thrown during CV destruction.

Fixes oss-fuzz #25343.
2020-09-01 15:16:41 +02:00
George Peter Banyard 5c1cf7669b Prepend compiler warning flags to CFLAG instead to append them
Credit to @bwoebi for the idea

Closes GH-6057
2020-09-01 14:45:57 +02:00
Nikita Popov 48e31be7a3 Fix FE_FETCH_R_SIMPLE specialization
After a99d08b5d1 the type can
include UNDEF. However, UNDEF can only reach FE_FREE, not FE_FETCH.
As such, simply ignore this type.
2020-09-01 14:43:06 +02:00
Nikita Popov 6ff5b3df1c Avoid null pointer UB in accel blacklist
Pretty annoying...
2020-09-01 14:43:06 +02:00
Máté Kocsis 47d9446c48 Promote warnings to exceptions in ext/soap and ext/xmlwriter
Closes GH-5998
2020-09-01 14:22:19 +02:00
Máté Kocsis 7476d2c188 Promote warnings to exceptions in ext/tidy
Closes GH-6051
2020-09-01 14:18:02 +02:00
Nikita Popov a99d08b5d1 Fix type inference for FE_RESET on invalid type
FE_RESET sets the result to UNDEF in this case. We should infer
some type here, because no type generally implies unreachable
code. In this case SCCP ended up replacing the FE_RESET result
with null, including in FE_FREE.
2020-09-01 13:59:36 +02:00
Nikita Popov c088a9369f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix pi node removal when removing predecessor
2020-09-01 12:26:18 +02:00
Nikita Popov 682823b75b Add explicit double cast
Avoid precision warning.
2020-09-01 12:25:38 +02:00
Nikita Popov 37612936a1 Fix pi node removal when removing predecessor
We can't just remove the uses, we need to replace uses.

The test case only fails on master with SSA integrity violations,
but I believe the root issue also existed previously.
2020-09-01 12:25:00 +02:00
Dmitry Stogov 91d7e872e0 Fixed nested init fcall guards. 2020-09-01 12:24:11 +03:00
Alex Dowad b03fd37677 Code cleanup in mbstring.c 2020-08-31 23:19:43 +02:00
Alex Dowad cdc664049c Comment constants in mbfl_consts.h, remove unused ones
These were unused, and almost certainly will never be used:

- MBFL_ENCTYPE_MWC4BE
- MBFL_ENCTYPE_MWC4LE
- MBFL_ENCTYPE_SHFTCODE
- MBFL_ENCTYPE_ENC_STRM

For the latter two, there were some encodings which were marked with these flags;
but nothing ever _checked_ these particular flags.
2020-08-31 23:18:56 +02:00
Alex Dowad 3a100cd7ac Add comment on mbstring East Asian Width table 2020-08-31 23:18:45 +02:00
Alex Dowad 7eddcabe2b Don't guard mbstring code with #ifdef HAVE_MBSTRING
This is just a very silly feature of mbstring -- you can compile the source files with
HAVE_MBSTRING undefined, and it will all just compile to (almost) nothing. What is the
use of this? Why compile the source files and link against them if you don't want the
mbstring extension? It doesn't make any kind of sense.
2020-08-31 23:18:13 +02:00
Alex Dowad 62317d592f Remove redundant includes from mbstring (and make sure correct config.h is used)
Very interesting... it turns out that when Valgrind support was enabled,
`#include "config.h"` from within mbstring was actually including the file "config.h"
from Valgrind, and not the one from mbstring!!

This is because -I/usr/include/valgrind was added to the compiler invocation _before_
-Iext/mbstring/libmbfl.

Make sure we actually include the file which was intended.
2020-08-31 23:17:58 +02:00
Alex Dowad b7808d02e8 Remove useless definition of NULL in mbfl_string.h
If NULL is not defined by the platform, mbfl_defs.h already defines it.
2020-08-31 23:17:49 +02:00
Alex Dowad ea3f0ee0b9 Optimize php_unicode_convert_case (cuts mbstring case conversion time ~15%)
This function uses various subfunctions to convert case of Unicode wchars.
Previously, these subfunctions would store the case-converted characters in
a buffer, and the parent function would then pass them (byte by byte) to
the next filter in the filter chain.

Rather than passing around that buffer, it's better for the subfunctions to
directly pass the case-converted bytes to the next filter in the filter chain.
This speeds things up nicely.
2020-08-31 23:17:25 +02:00
Alex Dowad ddc76e5abf Fix typos in comments in mb_send_mail 2020-08-31 23:17:14 +02:00
Alex Dowad a64241b540 Remove unused functions from mbstring
- mbfl_buffer_converter_reset
- mbfl_buffer_converter_strncat
- mbfl_buffer_converter_getbuffer
- mbfl_oddlen
- mbfl_filter_output_pipe_flush
- mbfl_memory_device_output2
- mbfl_memory_device_output4
- mbfl_is_support_encoding
- mbfl_buffer_converter_feed2
- _php_mb_regex_globals_dtor
- mime_header_encoder_feed
- mime_header_decoder_feed
- mbfl_convert_filter_feed
2020-08-31 23:16:57 +02:00
Alex Dowad 8d13348bb5 Separate implementation of mb_{en,de}code_numericentity
Rather than using a magic boolean parameter to choose different behavior of
the subfunction, inline it. The code size doesn't really grow anyways. And
soon these will be trimmed down more.
2020-08-31 23:16:28 +02:00
Alex Dowad 29b02bf290 Use new-style argument parsing macros in mbstring.c 2020-08-31 23:16:21 +02:00
Alex Dowad d4ef7ef11d Inline unneeded indirection for mbstring memory management
All memory allocation and deallocation for mbstring bounces through a table of
function pointers before going to emalloc/efree/etc. But this is unnecessary.
The allocators are never swapped out. Better to just call them directly.
2020-08-31 23:16:09 +02:00
Alex Dowad dc98c1346d Additional tests for mbstring extension 2020-08-31 23:15:57 +02:00
Christoph M. Becker d4d52ba945 Prevent com::__construct() to modify the $server_name array
We switch to `zend_string`s for simplicity, so there's no need to
`convert_to_string()` anymore, what makes the array separation
superfluous.

Closes GH-6040
2020-08-31 17:44:27 +02:00
Nikita Popov 4acac9bd72 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix leak on assign concat of array and empty string
2020-08-31 17:06:21 +02:00
Nikita Popov 9560e3ba7a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix leak on assign concat of array and empty string
2020-08-31 17:05:55 +02:00
Nikita Popov cd2afd99b1 Fix leak on assign concat of array and empty string 2020-08-31 17:05:31 +02:00
Nikita Popov 2022f2e5c9 Fix nullsafe operator with delayed oplines
Closes GH-6056.
2020-08-31 16:44:36 +02:00
Ilija Tovilo 70300f6c9d Add tests for nullsafe operator on delayed oplines 2020-08-31 16:44:36 +02:00
Dmitry Stogov 4163923e83 More agressive "packed array" guards insertion 2020-08-31 16:34:56 +03:00
Nikita Popov 53a87547c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix leak on consteval exception in ReflectionClass::__toString()
2020-08-31 15:10:53 +02:00
Nikita Popov 1f6f9c70cb Fix leak on consteval exception in ReflectionClass::__toString() 2020-08-31 15:10:09 +02:00
Nikita Popov 1036fd2a70 Merge branch 'PHP-7.4'
* PHP-7.4:
  Check update constant failure in ReflectionClassConstant::__toString()
2020-08-31 14:50:40 +02:00
Nikita Popov 8bb2f406de Check update constant failure in ReflectionClassConstant::__toString() 2020-08-31 14:50:20 +02:00
Nikita Popov ecd986c879 Fix build warnings after timelib update 2020-08-31 14:28:39 +02:00
Dmitry Stogov 5828d547ba Perform type guard checks before IS_UNDEF checks (check IS_UNDEF during deoptimization) 2020-08-31 15:25:23 +03:00
Nikita Popov b4196ae9df Fix fetching default value of internal function with userland arginfo
"Fix" in the sense of "not crash". We aren't able to actually
display the default value for this case, as there's no way to
fetch the relevant information right now.
2020-08-31 14:03:54 +02:00
Derick Rethans bef20d47af Merge branch 'PHP-7.4' into master 2020-08-31 12:33:44 +01:00
Derick Rethans 41e11a8e71 Merge branch 'PHP-7.3' into PHP-7.4 2020-08-31 12:31:44 +01:00
Derick Rethans 488e53c18b Fixed test case 2020-08-31 12:31:23 +01:00
Derick Rethans 8ec906563c Update timelib to 2020.02 2020-08-31 12:23:54 +01:00
Derick Rethans c9b5a29eb6 Merge branch 'master' of git.php.net:php-src into master 2020-08-31 12:03:21 +01:00