1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Commit Graph

56293 Commits

Author SHA1 Message Date
Nikita Popov ce74ff2b3d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #80046
2020-09-03 11:18:11 +02:00
Nikita Popov 04e77d2dea Fixed bug #80046
We already protect against optimizing away loop frees in DFA pass,
but not in block pass.
2020-09-03 11:18:01 +02:00
Dmitry Stogov 67e9b3be39 JIT for FE_FETCH_R 2020-09-03 12:06:06 +03:00
Christoph M. Becker 7769ae18a1 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Skip test if A: drive exists
2020-09-03 10:33:35 +02:00
Christoph M. Becker 658ad4d046 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Skip test if A: drive exists
2020-09-03 10:30:39 +02:00
Christoph M. Becker c70a938f28 Skip test if A: drive exists
Otherwise the test case will fail for a very different reason.
2020-09-03 10:29:38 +02:00
Dmitry Stogov 6b521a98d4 Fixed support for deprecated constants (Zend/tests/const_deprecation.phpt failure) 2020-09-03 10:49:58 +03:00
Dmitry Stogov 91edb90767 JIT for FETCH_CONSTANT 2020-09-03 00:51:43 +03:00
Dmitry Stogov 508f8285e2 Reorder switch cases for consistency between zend_jit() and zend_jit_trace() 2020-09-02 23:16:58 +03:00
Anatol Belski e64c386b62 libmagic: Update patch
[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
2020-09-02 21:25:24 +02:00
Alex Dowad 73dcfb6faa Fix typos in mbstring tests
Man, I can be pedantic sometimes. Tiny little things like misspelled words just
hurt me inside. So while it's not really a big deal, I couldn't leave these typos
alone...
2020-09-02 20:48:22 +02:00
Benjamin Eberlei 8b37c1e993 Change Attribute Syntax from @@ to #[] 2020-09-02 20:26:50 +02:00
Anatol Belski f2b40775af Revert "libmagic: Move the allocation on the stack"
This reverts commit 1d84a58736.

Signed-off-by: Anatol Belski <ab@php.net>
2020-09-02 20:04:00 +02:00
Dmitry Stogov f3f5719355 JIT for FE_FETCH_R 2020-09-02 20:10:02 +03:00
Anatol Belski 8c31001bf1 libmagic: Constify arg 2020-09-02 17:35:51 +02:00
Anatol Belski 1d84a58736 libmagic: Move the allocation on the stack 2020-09-02 17:35:51 +02:00
Anatol Belski 3d1e7d37eb hash: Fix warning in the bench script 2020-09-02 17:35:51 +02:00
Nikita Popov 0bc2657b2f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix binary-safety of parse_url
2020-09-02 16:46:49 +02:00
Nikita Popov 81811dbbfb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix binary-safety of parse_url
2020-09-02 16:45:57 +02:00
Nikita Popov 54dbd3eccc Fix binary-safety of parse_url
php_parse_url() is intended to support strings that are not zero
terminated. We can't use strcspn in the implementation.

As we have two uses of strcspn, add a helper.
2020-09-02 16:45:25 +02:00
Frank Du c3299d7dab X86: Fast CRC32 computation using PCLMULQDQ instruction
Based on:
"Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction"
V. Gopal, E. Ozturk, et al., 2009, http://intel.ly/2ySEwL0

Signed-off-by: Frank Du <frank.du@intel.com>

Closes GH-6018
2020-09-02 15:10:41 +02:00
Michael Voříšek cb284f668c Fix typo in test description
Closes GH-6062.
2020-09-02 13:07:40 +02:00
Dmitry Stogov 4d97ab20fc Added missing helper 2020-09-02 12:59:52 +03:00
Dmitry Stogov 225cd9da86 Improved JIT for VERIFY_RETURN_TYPE 2020-09-02 12:55:16 +03:00
Máté Kocsis 3e800e997b Move custom type checks to ZPP
Closes GH-6034
2020-09-02 11:11:38 +02:00
Dmitry Stogov c98e1747a8 Minimal JIT support for JMP_NULL 2020-09-02 11:49:42 +03:00
Dmitry Stogov 7484b8f036 Preallocate zval for unused result of internal function on CPU stack 2020-09-02 02:03:38 +03:00
Levi Morrison 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 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