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

725 Commits

Author SHA1 Message Date
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
Christoph M. Becker
f5b9cc4bcf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix length of key passed to zend_hash_str_find_ptr
2019-09-21 18:13:06 +02:00
Christoph M. Becker
33e556fab4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix length of key passed to zend_hash_str_find_ptr
2019-09-21 18:12:27 +02:00
Jinesh Patel
0d6c2448a7 Fix length of key passed to zend_hash_str_find_ptr 2019-09-21 18:11:21 +02:00
viest
48040cf345 Remove deprecated getaddrinfo flags
The AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES have
been deprecated by glibcs, and PHP 7.4 follows this deprecation.

This removes the offending flags for PHP 8.0.
2019-08-26 11:45:31 +02:00
Nikita Popov
06a4a9ba42 Merge branch 'PHP-7.4' 2019-08-26 11:33:38 +02:00
viest
5703943081 Deprecate AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES
These flags have been deprecated in glibc 2.28, so we also
deprecate them in PHP.

As we can't deprecate constants, we can only check for their use
in socket_addrinfo_lookup().
2019-08-26 11:33:18 +02:00
Peter Kokot
89a6ebd0e9 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update changelog
  Remove unused MISSING_MSGHDR_MSGFLAGS
2019-07-18 02:18:18 +02:00
Peter Kokot
53299d610a Remove unused MISSING_MSGHDR_MSGFLAGS
Closes GH-4426
2019-07-18 02:17:14 +02:00
Peter Kokot
e0ea444dd3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Convert all php_error_docref0 to php_error_docref
2019-07-13 02:10:17 +02:00
George Peter Banyard
1c1de0c41a Convert all php_error_docref0 to php_error_docref
Closes GH-4394
2019-07-13 02:05:17 +02:00
Nikita Popov
057012f241 Merge branch 'PHP-7.4' 2019-07-03 12:48:00 +02:00
Nikita Popov
d6d9024cb8 Avoid use of random ports in some socket tests 2019-07-03 12:47:49 +02:00
Peter Kokot
0d9318a424 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused check for struct cmsghdr
2019-07-01 13:18:08 +02:00
Peter Kokot
c70d9cdb11 Remove unused check for struct cmsghdr
The result of this check is to whether to define the HAVE_CMSGHDR symbol
or not. The HAVE_CMSGHDR is never used in the code and it has been
removed via 90289924c0.

Closes GH-4337
2019-07-01 13:13:51 +02:00
Peter Kokot
98d0892dd8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Sync functions checks
2019-06-30 23:59:47 +02:00
Peter Kokot
9a3c8e51e3 Sync functions checks
Removed unused checks:
- mbsinit check removed, HAVE_MBSINIT removed (not used in php-src)
- mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since
  560ed89bfb which uses PHP's own implementation)
- strpncpy check removed, added via a8c9e893b6 and
  not used.
- setpgid check removed since HAVE_SETPGID is not used

Moved to a central configure.ac:
- fpclass
- mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src)
- sigprocmask
- getcwd
- getwd
- glob
- strfmon
- nice

Duplicated checks removed:
- gethostname
- getlogin
- getpwuid_r
- socketpair

- mprotect check simplified
2019-06-30 23:57:54 +02:00
Peter Kokot
6bfa6bff0b Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean headers checks
2019-06-27 02:45:31 +02:00
Peter Kokot
2079b09854 Clean headers checks
Some headers were checked multiple times in the main configure.ac file
and in the bundled extensions or SAPIs themselves. Also many of these
checks are then used accross other extensions or SAPIs so a central
configure.ac makes most sense for these checks.
2019-06-27 02:45:09 +02:00
Nikita Popov
0d31a8e4e1 Merge branch 'PHP-7.4' 2019-06-20 17:24:43 +02:00
Nikita Popov
dd6d471834 Handle misaligned ifreq on macos 2019-06-20 17:24:16 +02:00
Joe Watkins
9bcbd80775 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky socket test
2019-06-18 08:31:32 +02:00
Joe Watkins
68785c00ef fix flaky socket test 2019-06-18 08:30:46 +02:00
Joe Watkins
99dfc5e640 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove dead code in sockets extension [ci skip]
2019-06-15 08:39:50 +02:00
George Peter Banyard
cfdca10910 Remove dead code in sockets extension [ci skip] 2019-06-15 08:39:35 +02:00
Joe Watkins
7231ee9f55 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky socket tests
2019-06-15 08:09:17 +02:00