1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

750 Commits

Author SHA1 Message Date
George Peter Banyard f91f72607b Drop unnecessary stdint and inttypes header checks
These are always available as of C99.

Closes GH-5323

Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de>
2020-04-22 20:18:19 +02:00
George Peter Banyard 0b99017516 Fix error message in ext/socket 2020-04-22 00:50:32 +02:00
George Peter Banyard 7ff8eaa545 Promote warnings to Errors in sockets's extension. 2020-04-21 20:41:26 +02:00
Nikita Popov 58f9c4053e Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't rand() in test
2020-04-20 16:37:19 +02:00
Nikita Popov 3e9dac2c6b Don't rand() in test
Instead use port 0 to get a free port from the OS.
2020-04-20 16:35:52 +02:00
George Peter Banyard 9f8eb9d515 Fix [-Wjump-misses-init] in sockets extension 2020-04-18 14:52:48 +02:00
Guillaume Charifi adea221b1a Improve socket cmsg space handling.
This should also fix the null pointer arithmetic warning on MacOS as we don't depend on whack code written by Apple.

Closes GH-5387
2020-04-14 17:10:21 +02:00
Nikita Popov d0006b5fac Use UNKNOWN default for socket_connect()
Specifying the port is mandatory for INET sockets.
2020-04-14 16:09:01 +02:00
Nikita Popov b9b2e8ddde Fix socket_write() default value 2020-04-14 16:08:55 +02:00
Máté Kocsis 3709e74b5e Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +02:00
Máté Kocsis 21cfa03f17 Generate function entries for another batch of extensions
Closes GH-5352
2020-04-05 21:15:30 +02:00
Máté Kocsis a43bc33fb2 Annotate function aliases in stubs 2020-04-04 13:03:16 +02:00
Nikita Popov 2bcc4ab8f4 Verify that all stubs have a return type 2020-04-03 17:59:30 +02:00
Nikita Popov 934e60b594 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't specify ports in socket_export_stream-4.phpt
2020-03-16 10:32:39 +01:00
Nikita Popov a57905dbac Don't specify ports in socket_export_stream-4.phpt
Let the system pick a free port instead...
2020-03-16 10:32:04 +01:00
Máté Kocsis 736b22dc0b Add stubs for aliases
Closes GH-5187
2020-02-18 21:10:36 +01:00
George Peter Banyard 2efa0b3bfa Address path is 104 bytes on macOs compared to 108 on Linux 2020-02-04 22:23:56 +01:00
Nikita Popov f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Nikita Popov 6811222422 Eliminate uses of ZVAL_ZVAL and friends
Instead add RETURN_COPY(_VALUE) macros will the expected behavior.

RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck
around, probably because the alternative was to write directly to
the return_value variable.
2020-01-20 10:34:17 +01:00
Máté Kocsis d1764ca330 Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis afdaa91170 Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
George Peter Banyard 1589266f85 Remove dead code and unused DEFINEs
Closes GH-5073
2020-01-10 22:24:15 +01:00
Máté Kocsis aadd3aaed9 Use RETURN_THROWS() in various places 2020-01-03 21:10:24 +01:00
Máté Kocsis bbcfa66e06 Use RETURN_THROWS() after zend_fetch_resource*() 2020-01-03 19:20:56 +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
Christoph M. Becker 424d34d1c0 Make test more resilient
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to be marked as borked.  Since we're checking the return value
anyway, we can silence warnings.
2019-11-21 13:40:36 +01:00
Christoph M. Becker 735c4cab74 Make test more resilient
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to fail.
2019-11-11 18:08:54 +01:00
Máté Kocsis 27e83d0fb8 Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Máté Kocsis 9493893412 Cleanup return values when parameter parsing is unsuccessful 2019-10-30 16:05:20 +01:00
Christoph M. Becker ecc9588d0c Properly handle non resources passed to socket_select()
As of PHP 8.0.0, failing `zend_fetch_resource_ex()` throws a TypeError,
so we cannot simply skip non resources in the `$read`, `$write` and
`$except` arrays.  Instead we bail out.  Since these arrays are already
checked in `php_sock_array_to_fd_set()`, we remove the additional check
in `php_sock_array_from_fd_set()`.
2019-10-18 14:16:25 +02:00
Christoph M. Becker 77bd1ce60d Just return after exception has been thrown 2019-10-12 23:09:23 +02:00
Thomas Gerbet 428bd3d908 Add stubs for ext-sockets 2019-10-12 17:08:24 +02:00
Christoph M. Becker cc8739cfb9 Fix potentially borked test case
If interface 'lo' is not available, `socket_set_option()` may warn,
which would cause the test to be marked as borked.  Thus we silence the
function call.
2019-10-12 16:48:45 +02:00
Christoph M. Becker 52f0610b74 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test case
2019-10-12 16:29:42 +02:00
Christoph M. Becker f6bd5dcbe9 Fix test case
`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the
test would fail.
2019-10-12 16:28:57 +02:00
Christoph M. Becker 642f80636e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix potential heap corruption
2019-10-12 16:16:44 +02:00
Christoph M. Becker c10d3d3a35 Fix potential heap corruption
`tmp` is allocated by `malloc()`, so we must not `LocalFree()` it.
2019-10-12 16:16:14 +02:00
Christoph M. Becker 993463a65e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78665: Multicasting may leak memory
2019-10-12 14:46:36 +02:00
Christoph M. Becker 586f8515d5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78665: Multicasting may leak memory
2019-10-12 14:46:10 +02:00
Christoph M. Becker 7439d48bea Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78665: Multicasting may leak memory
2019-10-12 14:44:55 +02:00
Christoph M. Becker 900bdcbd03 Fix #78665: Multicasting may leak memory 2019-10-12 14:43:43 +02:00
Nikita Popov 85c8c5bfac Merge branch 'PHP-7.4' 2019-10-11 10:58:03 +02:00
Fabien Villepinte 8b8c226dbf Replace port already used
Closes GH-4811.
2019-10-11 10:57:09 +02:00
Fabien Villepinte 78c753e8ee Fix typo in tests 2019-10-10 15:57:57 +02:00
Nikita Popov b0cf34a30c Merge branch 'PHP-7.4' 2019-10-08 18:20:31 +02:00
Fabien Villepinte 8b5c351154 Avoid file clash in root_check skipifs
Extract root check into skipif_root.inc to share this commonly
repeated logic.

Closes GH-4779.
2019-10-08 18:20:13 +02:00
Nikita Popov 235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte 0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
Gabriel Caruso 5d6e923d46 Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Christoph M. Becker 0f56110615 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix length of key passed to zend_hash_str_find_ptr
2019-09-21 18:13:31 +02:00