1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Commit Graph

116385 Commits

Author SHA1 Message Date
Christoph M. Becker 2804ea6127 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test case for Windows
2019-11-11 12:56:55 +01:00
Christoph M. Becker ce047e6091 Fix test case for Windows 2019-11-11 12:49:32 +01:00
Christoph M. Becker 0a33536526 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test cases which fail on Windows debug builds
2019-11-11 12:34:50 +01:00
Christoph M. Becker 60081ca20d Fix test cases which fail on Windows debug builds
We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.
2019-11-11 12:14:38 +01:00
Christoph M. Becker adcc35916a Properly declare methods
While declaring methods with `PHP_FALIAS` kind of works, it is
semantically confusing, and also doesn't allow to specify access flags.
2019-11-11 10:58:21 +01:00
Dmitry Stogov 6e9dd13d63 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78714 (funcs returning pointer can't use call convention spec)
2019-11-11 12:09:47 +03:00
Dmitry Stogov ecd0c5b6ad Fixed bug #78714 (funcs returning pointer can't use call convention spec) 2019-11-11 12:07:48 +03:00
Christoph M. Becker b0391c3e26 Revert "Fix #78790: mysqli_get_client_info() expects exactly 0 parameters"
This reverts commit 87fad8cdf0, since,
apparently, `mysqli_get_client_info()` is also supposed to be called
without argument.
2019-11-11 10:06:21 +01:00
Christoph M. Becker 87fad8cdf0 Fix #78790: mysqli_get_client_info() expects exactly 0 parameters
`mysqli_get_client_info()` and `mysqli_thread_safe()` can also be
called as methods, so we have to cater to this when parsing the
arguments.
2019-11-11 10:01:17 +01:00
Benjamin Eberlei 3b34c4fa12 Merge branch 'DomFaliasCleanup' 2019-11-09 21:30:25 +01:00
Benjamin Eberlei f905a81979 ext/dom: Replace usages of PHP_FUNCTION and aliases with PHP_METHOD. 2019-11-09 21:29:42 +01:00
Benjamin Eberlei ee80567a83 Merge branch 'dom-arginfo-stubs' 2019-11-09 15:16:09 +01:00
Fabien Villepinte 1240c122a1 Merge branch 'PHP-7.4' 2019-11-09 13:56:23 +01:00
Fabien Villepinte ce41795a9f Fix conflicts in windows ACL tests
Closes GH-4898.
2019-11-09 13:55:42 +01:00
Fabien Villepinte 4d529757f8 Merge branch 'PHP-7.4' 2019-11-08 20:36:55 +01:00
Fabien Villepinte 9c4b989c75 Make test runner runnable without arguments
The default PHP executable was not set when no args were provided.

Closes GH-4894.
2019-11-08 20:33:19 +01:00
Nikita Popov 9bbbc9e7e9 Add support for union types in stubs
This is the MVP for supporting union types in PHP stubs. Return
types with only builtin types work, which is the part we mainly
need.

Closes GH-4895.
2019-11-08 17:32:18 +01:00
Tyson Andre 70b4bc963c Fix compile error using zend_parse_parameters_throw()
Fixes a bug introduced in 4008704f62

The trailing comma is followed by `)` when the varargs list
is empty in the macro, which is a syntax error in C

This fixes compilation of code such as the following

    PHP_FUNCTION(get_metadata) {
      if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "") == FAILURE) {
        return;
      }

Closes GH-4896.
2019-11-08 16:29:10 +01:00
Levi Morrison 1cb69c44d7 Merge branch 'PHP-7.4' 2019-11-08 08:04:52 -07:00
Levi Morrison 05bce66037 Merge branch 'PHP-7.3' into PHP-7.4 2019-11-08 08:02:49 -07:00
Levi Morrison 4a55794b98 Wrap php_random.h in C++ portability macros
Also remove portability headers. This goes against the existing
conventions of these files.
2019-11-08 07:58:26 -07:00
Nikita Popov 999e32b65a Implement union types
According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same time. Additionall, zend_type_list is
introduced as a new kind of pointer payload, which is used to store
multiple class types. Each of the class types is a tagged pointer,
which may be either a class name or class entry. The latter is only
used for typed properties, while arguments/returns will instead use
cache slots. A type list can contain a mix of both names and CEs at
the same time, as not all classes may be resolvable.

One thing this is missing is support for union types in arginfo
and stubs, which I want to handle separately.

I've also dropped the special object code from the JIT implementation
for now -- I plan to add this back in a different form at a later time.
For now I did not want to include non-trivial JIT changes together
with large functional changes.

Another possible piece of follow-up work is to implement "iterable"
as an internal alias for "array|Traversable". I believe this will
eliminate quite a few special-cases that had to be implemented.

Closes GH-4838.
2019-11-08 15:15:48 +01:00
Nikita Popov ac4e0f0852 Make zend_type a 2-field struct
We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).

Different types of pointer payloads are distinguished based on bits
in the type_mask.
2019-11-08 15:15:48 +01:00
Benjamin Eberlei 4253ca486d Convert ext/dom to use arginfo stub. 2019-11-08 15:05:35 +01:00
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Nikita Popov 80cfd99074 Reduce reallocations in exif parsing
Instead of reallocating lists element by element, increase the
allocated list size exponentially.
2019-11-07 21:20:34 +01:00
Nikita Popov 11649a6d77 Reduce size limit in parser fuzzer
Avoid stack overflows during compilation of deeply nested
expressions.
2019-11-07 21:20:34 +01:00
Máté Kocsis ab6b412a0b Add stubs for standard lib functions 2019-11-07 17:59:03 +01:00
Máté Kocsis afe4a879c7 Promote register_tick_function() callback validation warning to an exception 2019-11-07 17:56:58 +01:00
Máté Kocsis 662afc80f8 Remove PHP_SLEEP_NON_VOID as it is not useful anymore 2019-11-07 17:56:26 +01:00
Nikita Popov e710862f8c Add compile warning for "confusable" types
We have a number of "types" like integer which are not actually
supported as builtin types -- instead they are silently interpreted
as class types.

I've seen this cause confusion a few types already. This change adds
a warning in this case. In the unlikely case that someone legitimately
wants to type against an integer class, the warning can be suppressed
by writing \integer or "use integer", or using Integer (this warning
will only trigger for lowercase spellings).

Closes GH-4815.
2019-11-07 15:05:08 +01:00
Nikita Popov a573862676 Merge branch 'PHP-7.4'
* PHP-7.4:
  Wrap hrtime in `extern "c" {}`
2019-11-07 14:42:16 +01:00
Nikita Popov 6ddb381ae5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Wrap hrtime in `extern "c" {}`
2019-11-07 14:42:11 +01:00
Levi Morrison b9dfa12853 Wrap hrtime in extern "c" {}
This allows it to be used by C++ extensions without them having to do their own forward declares.

Closes GH-4890.
2019-11-07 14:41:58 +01:00
Nikita Popov ea6d22cfad Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix php_pcre_mutex_free()
2019-11-07 14:32:03 +01:00
Nikita Popov e19f0e86dc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix php_pcre_mutex_free()
2019-11-07 14:31:55 +01:00
Nikita Popov 6dcc0b859f Fix php_pcre_mutex_free()
We should only set the mutex to NULL if we actually freed it.
Due to missing braces non-main threads may currently set it to
NULL first.
2019-11-07 14:31:19 +01:00
Nikita Popov e9bdb5cd08 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove outdated comments in test
2019-11-07 14:06:53 +01:00
Nikita Popov aba89f56ff Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Remove outdated comments in test
2019-11-07 14:06:48 +01:00
Nikita Popov 29f4939923 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Remove outdated comments in test
2019-11-07 14:06:33 +01:00
Nikita Popov ee243bc471 Remove outdated comments in test 2019-11-07 14:06:23 +01:00
Nikita Popov cb03bbbf60 Merge branch 'PHP-7.4'
* PHP-7.4:
  Disable ifunc resolvers under thread sanitizer as well
2019-11-07 13:11:58 +01:00
Nikita Popov dacadf5aa3 Disable ifunc resolvers under thread sanitizer as well 2019-11-07 13:08:03 +01:00
Nikita Popov bae312d040 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add UPGRADING note about default object from empty value

[ci skip]
2019-11-07 11:48:52 +01:00
Nikita Popov d3d85cbcc1 Add UPGRADING note about default object from empty value
Fixes bug #75921.

[ci skip]
2019-11-07 11:48:02 +01:00
Nikita Popov 0027ad4801 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78759
2019-11-07 11:17:38 +01:00
Nikita Popov aed4f6e849 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78759
2019-11-07 11:17:14 +01:00
Nikita Popov 8d2a9d8859 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78759
2019-11-07 11:16:24 +01:00
Nikita Popov 5fa6dcd972 Fixed bug #78759
Handle INDIRECT values in array.
2019-11-07 11:15:29 +01:00
Christoph M. Becker 34dda406bd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78788: ./configure generates invalid php_version.h
2019-11-07 10:01:43 +01:00