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

677 Commits

Author SHA1 Message Date
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
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
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
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
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
Fabien Villepinte
8b8c226dbf Replace port already used
Closes GH-4811.
2019-10-11 10:57:09 +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
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +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
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
53299d610a Remove unused MISSING_MSGHDR_MSGFLAGS
Closes GH-4426
2019-07-18 02:17:14 +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
d6d9024cb8 Avoid use of random ports in some socket tests 2019-07-03 12:47:49 +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
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
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
dd6d471834 Handle misaligned ifreq on macos 2019-06-20 17:24:16 +02:00
Joe Watkins
68785c00ef fix flaky socket test 2019-06-18 08:30:46 +02:00
George Peter Banyard
cfdca10910 Remove dead code in sockets extension [ci skip] 2019-06-15 08:39:35 +02:00
Joe Watkins
afdf7ed5ba fix flaky socket tests 2019-06-15 08:08:08 +02:00
Joe Watkins
f16b012116 fix mac tests on azure 2019-06-14 12:55:00 +02:00
Nikita Popov
4603ce731b Don't throw warning if testing multiple ports 2019-06-13 09:34:23 +02:00
Nikita Popov
cdefeb715b Use memset instead of brace initialization
Apparently {{0}} is not enough ... let's not rely on structure
layout specifics here.
2019-06-12 13:50:23 +02:00
Nikita Popov
2134cc25d2 Guard functions by SO_PASSCRED 2019-06-12 13:17:25 +02:00
Nikita Popov
f601eb15e6 Fix -Wmissing-braces warnings
Unfortunate that = {} is a GNU extension.
2019-06-12 11:54:12 +02:00
Joe Watkins
c54a247cb0 fix flaky sockets test - form of response is OS dependent 2019-06-12 08:47:35 +02:00
Joe Watkins
abe38b5e48 fix flaky test on OSX 2019-06-12 08:33:07 +02:00
Joe Watkins
52ca8ca7d5 fix flaky ipv4 loopback test 2019-06-10 10:35:31 +02:00
Christoph M. Becker
3b05bdedcd Use zero port in socket_(export|import)_stream-4-win.phpt
These regularly fail due to port clashes, though we don't seem to
use those ports in any other tests.

As we don't care about the specific port that is used here, pass
zero so that a random ephemeral port is used.
2019-06-06 16:19:19 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Nikita Popov
528aa7932a Use zero port in socket_(export|import)_stream-5.phpt
These regularly fail due to port clashes, though we don't seem to
use those ports in any other tests.

As we don't care about the specific port that is used here, pass
zero so that a random ephemeral port is used.
2019-06-05 11:58:11 +02:00
Nikita Popov
d512075ff8 Fix potential port conflicts 2019-06-04 16:11:52 +02:00
Christoph M. Becker
c12d474653 Prevent parallel test conflicts
These ports are already used by another test, so we change them.
2019-05-27 18:42:52 +02:00
Nikita Popov
fc8fb77262 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-23 11:13:14 +02:00
Nikita Popov
b394654c1e Merge branch 'PHP-7.2' into PHP-7.3 2019-05-23 11:12:59 +02:00
Nikita Popov
9a74b23297 Fixed bug #78038 socket_select with references 2019-05-23 11:12:15 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Dmitry Stogov
e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03:00
Nikita Popov
7f6c22cb3d Fix last maybe uninit warnings on 7.4
Most of these only occur under GCC 5. Not fond of all the workarounds
(especially the PDO one), but it gets us a clean build...
2019-04-15 11:35:13 +02:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Nikita Popov
c8e10c6119 More zpp error/variation test removals 2019-03-07 15:54:31 +01:00
Nikita Popov
8c62c69265 More zpp error/variation test removals
Some of these tests also check non-zpp conditions -- however, there is
always some other test that also checks those error conditions.
2019-03-06 13:40:22 +01:00
Nikita Popov
c937c55d75 Fix some port collisions in sockets tests 2019-02-25 09:24:45 +01:00
Nikita Popov
db894844e7 Avoid port conflicts in ext/sockets tests 2019-02-19 15:53:24 +01:00
Rodrigo Prado
b86d7738fb Add test socket_setopt() basic functionality
Rodrigo Prado de Jesus royopa@gmail.com
User Group: PHPSP #PHPTestFestBrasil
---------------------------------------------------------------
The function was not coveraged yet
sockets	Function	socket_setopt	no
http://gcov.php.net/viewer.php?version=PHP_HEAD&func=tested_functions
2019-02-13 02:30:48 +01:00