Ilija Tovilo
50f58c8923
Add ASAN XLEAK support
...
Only disable LSAN instead of skipping the test. This way we can still detect
memory issues which is arguably more important anyway.
Closes GH-10996
2023-04-03 08:02:19 +02:00
David CARLIER
717f460fa4
ext/posix: posix_eaccess little update and forgotten UPGRADING entry. ( #10965 )
2023-03-29 20:08:42 +01:00
David CARLIER
2b354318d9
ext/posix: proposing posix_eaccess. unlike access, it is not standard but available in enough platforms ; on linux it's euidaccess in reality eaccess being 'just' an alias. key difference is eaccess checks the effective user id instead.
...
Close GH-10917
2023-03-27 22:32:16 +01:00
Cristian Rodríguez
ab3f871846
posix: fix misuse of bool (invalid code in c23)
...
a bool pointer argument cannot take true or false but either &boolval
or NULL
Closes GH-10577.
2023-02-13 19:40:03 +00:00
David Carlier
dee39518a0
posix detects posix_pathconf api.
...
alpine linux throws undefined reference at build time, thus
not assuming it s necessarily available.
Closes GH-10350.
2023-01-23 17:49:34 +00:00
Máté Kocsis
7936c8085e
Fix GH-8329 Print true/false instead of bool in error and debug messages ( #8385 )
2023-01-23 10:52:14 +01:00
David Carlier
55d19eee49
posix adding posix_fpathconf.
...
follow-up on GH-10238 but with the file descriptor flavor.
Close GH-10253
2023-01-12 22:15:31 +00:00
David Carlier
61cf7d49ab
posix_pathconf throwing ValueError on empty path
2023-01-10 15:03:11 +00:00
David CARLIER
84af629e7e
follow-up on GH-10238. ( #10243 )
...
fixes based on feedback.
2023-01-06 18:03:59 +00:00
David Carlier
69d49e4dd7
posix adding posix_pathconf.
...
to get configuration variables from a directory/file.
Closes GH-10238.
2023-01-06 14:59:02 +00:00
George Peter Banyard
31e7d6ef05
Check that int file descriptor is valid for posix_(isatty|ttyname)
2023-01-04 19:55:36 +00:00
George Peter Banyard
54767b1047
Manually handle int ZPP for posix_isatty()/posix_ttyname()
2023-01-04 19:55:36 +00:00
David Carlier
2a8cecdc3d
Merge branch 'PHP-8.2'
2023-01-02 16:55:54 +00:00
David Carlier
acb1af802d
Merge branch 'PHP-8.1' into PHP-8.2
2023-01-02 16:55:03 +00:00
Niels Dossche
d5f0362e59
Fix GH-10202: posix_getgr(gid|nam)_basic.phpt fail
...
The issue was that passwd was empty for the issue reporter, but the test
expected passwd to be non-empty. An empty passwd can occur if there is
no (encrypted) group password set up.
2023-01-02 16:54:47 +00:00
George Peter Banyard
11f6022365
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix GH-10187: Segfault in stripslashes() with arm64
Fix memory leak in posix_ttyname()
2022-12-30 16:43:05 +00:00
George Peter Banyard
e6c9b176d4
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix GH-10187: Segfault in stripslashes() with arm64
Fix memory leak in posix_ttyname()
2022-12-30 16:42:45 +00:00
George Peter Banyard
c2b0be5570
Fix memory leak in posix_ttyname()
...
Closes GH-10190
2022-12-30 16:24:28 +00:00
Ilija Tovilo
edd6fd7cad
[skip ci] Mark posix_getrlimit test as un-repeatable
...
The test assumes that the hard-limit is unlimited at script entrance
which doesn't hold on the second run.
2022-10-28 10:48:11 +02:00
Ilija Tovilo
c3b9b0f9a7
Fix stub type info for posix_getrlimit
2022-10-28 10:44:08 +02:00
Ilija Tovilo
d10a04b391
Allow specifying resource in posix_getrlimit() for single result
...
Closes GH-9790
2022-10-27 10:46:09 +02:00
David Carlier
a5a8b5ff7e
posix add sysconf call.
...
providing handful of common and most used constants.
Closes GH-9481.
2022-09-04 17:11:25 +01:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants ( #9439 )
2022-08-28 08:27:19 +02:00
Máté Kocsis
17f3631d95
Declare ext/posix constants in stubs ( #9095 )
2022-07-22 13:08:58 +02:00
Máté Kocsis
c8f858ef49
Add more specific array return type hints for various extensions - part 4 ( #7469 )
2021-09-06 17:14:52 +02:00
Patrick Allaert
aff365871a
Fixed some spaces used instead of tabs
2021-06-29 11:30:26 +02:00
Nikita Popov
39131219e8
Migrate more SKIPIF -> EXTENSIONS ( #7139 )
...
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00
Nikita Popov
7485978339
Migrate SKIPIF -> EXTENSIONS ( #7138 )
...
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
George Peter Banyard
b6958bb847
Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. ( #6661 )
...
RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com >
2021-05-31 15:48:45 +01:00
Nikita Popov
28c27cdbe5
Skip posix_setrlimit() test on FreeBSD
...
FreeBSD does not report an error on the second call, the limit is
simply not raised.
2021-05-19 16:59:27 +02:00
Nikita Popov
87e76851e8
Fix posix getpwnum/getpwuid tests with empty passwd
...
On Linux passwd is "x", on FreeBSD it is just "".
Also switch the test to use EXPECTF, I don't see a reason why it
should use EXPECTREGEX.
2021-05-18 17:07:06 +02:00
KsaR
01b3fc03c3
Update http->https in license ( #6945 )
...
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
2973a71a91
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix gidlist allocation leak on error
2021-04-11 10:38:16 +02:00
Nikita Popov
26d417d758
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix gidlist allocation leak on error
2021-04-11 10:38:07 +02:00
Nikita Popov
454d297564
Fix gidlist allocation leak on error
2021-04-11 10:37:40 +02:00
Nikita Popov
7f4513f1cb
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Support more than NGROUPS_MAX groups on macos
2021-04-08 12:25:26 +02:00
Nikita Popov
032905b5a0
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Support more than NGROUPS_MAX groups on macos
2021-04-08 12:25:16 +02:00
Nikita Popov
eebcfeb68e
Support more than NGROUPS_MAX groups on macos
...
I suspect this is the cause for our recent CI failures. Apparently,
on macos it is possible for getgroups() to return more than
NGROUPS_MAX groups. We avoid an EINVAL in that case by fetching
the exact number of groups in advance. This should work on both
macos and posix systems.
2021-04-08 12:23:39 +02:00
Nikita Popov
3e2e2f12cb
Display error message when posix_getgroups() test fails
...
This test started having many intermittent failures on MacOS
recently.
2021-04-08 10:45:43 +02:00
Máté Kocsis
bf0f6aaf18
Improve class entry generation
...
Related to GH-6701
2021-02-16 13:09:56 +01:00
Máté Kocsis
5b5bfd6be4
Generate class entries from stubs for phar, posix, pspell, readline, reflection, session, shmop
...
Closes GH-6692
2021-02-15 00:11:22 +01:00
Nikita Popov
b10416a652
Deprecate passing null to non-nullable arg of internal function
...
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.
This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)
RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
Closes GH-6475.
2021-02-11 21:46:13 +01:00
David Carlier
ebca8deaaf
posix: adding freebsd specific rlimit constants
...
Respectively number of kqueues, pty limits per user.
Closes GH-6608.
2021-01-18 10:44:21 +01:00
Nikita Popov
35dece02bb
Remove redundant posix_getrlimit_basic.phpt
...
It is identical to posix_getrlimit.phpt, apart from one extra
message being printed.
2021-01-18 10:41:07 +01:00
Nikita Popov
e54499219f
Skip tests under asan
...
When PDO firebird is loaded and these posix tests are run with
parallelism, LeakSanitizer will occasionally segfault. I was not
able to root cause this issue, as I failed to reproduce it in
simpler circumstances. I don't think it's an issue on our side
though.
2021-01-04 10:45:49 +01:00
Nikita Popov
d9dce839f7
Update ext/posix parameter names
...
Closes GH-6275.
2020-10-06 09:49:40 +02:00
Nikita Popov
fb4554e431
Throw warning for failed object to int/float conversion
...
We previously couldn't increase the error level here because it
was coupled to comparison handling. This is no longer the case
in PHP 8.
2020-09-21 17:04:39 +02:00
Nikita Popov
c5401854fc
Run tidy
...
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Máté Kocsis
ffff237497
Promote warning to exception in ext/posix
...
Closes GH-6009
2020-08-24 17:34:33 +02:00
Nikita Popov
ef773bf4d5
Remove posix_kill() test
...
This test is doing something really dubious. There's a race
condition here that would kill some poor process that happens
to start at just the wrong time.
2020-08-05 10:39:30 +02:00