1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Commit Graph

134943 Commits

Author SHA1 Message Date
David Carlier
cedec11acf sapi/fpm: little simplification for the kqueue backend. 2024-02-17 23:22:56 +00:00
Peter Kokot
76b7c5cc78 [skip ci] Make tidy.php executable 2024-02-17 18:30:04 +01:00
Saki Takamachi
ed1c9d8954 ext/standard: Add more tests to round() (#13399) 2024-02-17 13:44:55 +00:00
Niels Dossche
ae5beff61b Upgrade bundled pcre2lib to 10.43 (#13413) 2024-02-17 14:15:04 +01:00
David CARLIER
09415077f9 ext/ldap: few new unit tests (tls13 protocol). (#13409) 2024-02-16 18:26:08 +00:00
Jorg Adam Sowa
492b9e09e9 Add entry on return type of long2ip to NEWS (#13408)
[skip ci] add entry on return type of long2ip to NEWS and to UPGRADING.
2024-02-16 17:31:21 +00:00
Jorg Adam Sowa
e7b1f2a95b Change long2ip return type (#13395) 2024-02-16 17:11:18 +01:00
David CARLIER
eaaffae555 zend_call_stack sort of GH-13358 follow-up. (#13368)
for threaded context, it solely uses a new api only available on
illumos.
Here using a common older api to get the stack info for the current
thread.
while at it, completing stack_limit_010 test for these platforms.
2024-02-16 14:01:03 +00:00
Peter Kokot
b5c3cbf94b Check sockaddr_storage.ss_family with AC_CHECK_MEMBERS (#13407)
This simplifies the check. On AIX 6 and newer, the ss_family is
available, if compiled without defining COMPAT_43 (BSD 4.3
compatibility).
2024-02-16 14:24:55 +01:00
Peter Kokot
25923987b5 Refactor PHP_SOCKADDR_CHECKS (#13406)
Instead of the project macro, the sockaddr_storage and sockaddr.sa_len
can be checked with the AC_CHECK_TYPES and AC_CHECK_MEMBERS by including
the sys/socket.h. Some systems (~1988) didn't include the sys/types.h in
the socket.h (obsolete on current systems).

These macros by default define the HAVE_STRUCT_SOCKADDR_STORAGE and
HAVE_STRUCT_SOCKADDR_SA_LEN.
2024-02-16 13:29:20 +01:00
Arnaud Le Blanc
babe818168 [ci skip] Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] Adding myself as reviewer
  [ci skip] Adding myself as reviewer
2024-02-16 13:03:29 +01:00
Arnaud Le Blanc
9a034c9edb [ci skip] Adding myself as reviewer 2024-02-16 13:02:12 +01:00
Arnaud Le Blanc
51591ab7c7 [ci skip] Adding myself as reviewer 2024-02-16 13:00:42 +01:00
Arnaud Le Blanc
2065829074 [ci skip] NEWS 2024-02-16 12:50:10 +01:00
Kévin Dunglas
f84d0468ed add support for Zend Max Exeuction Timers on FreeBSD (#13393) 2024-02-16 12:45:15 +01:00
Dmitry Stogov
1f7cba2fec Update IR
IR commit: 89989794a25ac43778398545b32d030dddc0e8b1
2024-02-16 01:00:46 +03:00
Steve Wall
f6016c702f ext/ldap: Add LDAP_OPT_X_TLS_PROTOCOL_MAX and LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
close GH-13405.
2024-02-15 21:43:46 +00:00
Niels Dossche
87abd500e3 Fix 32-bit fileinfo (#13404)
libmagic 5.45 has a regression on 32-bit that is fixed in current HEAD,
but that's not released yet. Pull in the upstream fix [1].

[1] 218fdf813f
2024-02-15 20:47:49 +01:00
Peter Kokot
9588796294 Use AC_CHECK_TYPES for checking struct flock (#13397)
The struct flock is defined in fcntl.h, if system has it. This removes
redundant PHP_STRUCT_FLOCK M4 macro in favor of the AC_CHECK_TYPES,
which by default defines symbol HAVE_STRUCT_FLOCK.
2024-02-15 19:17:01 +01:00
Dmitry Stogov
ce96aa9188 Update IR
IR commit: f7c0ddb1b4630e1287b0239f85d64a6965dfea29
2024-02-14 23:57:22 +03:00
Peter Kokot
1e770d12c2 Use Autoconf AC_CHECK_TYPE for checking siginfo_t (#13389)
The siginfo_t is defined by including the signal.h. Some systems include
the siginfo.h in the signal.h. Including it separately is obsolete on
current systems.
2024-02-14 13:56:24 +01:00
Peter Kokot
b222c020bf Fix linking ext/curl against OpenSSL (#13262)
Following 68f6ab7113, the ext/curl doesn't
need to be linked against OpenSSL anymore, if curl_version_info_data
ssl_version is OpenSSL/1.1 or later.

With OpenSSL 3 and later the check for old SSL crypto locking callbacks
was detected here.

This also uses a common PHP_SETUP_OPENSSL macro for checking OpenSSL and
syncs the minimum OpenSSL version (currently 1.0.2 or later) across the
PHP build system.
2024-02-14 13:52:01 +01:00
David CARLIER
aa1eaacc41 zend_ssa minor struct changes. (#13387)
_zend_ssa_pid::has_range_constraint being the only bool, the bitfield would not bring
any benefit.
2024-02-14 07:41:52 +00:00
Máté Kocsis
844c1ac962 Add missing --EXTENSIONS-- section from frameless function inference test 2024-02-13 22:54:21 +01:00
haszi
e957e25c1c Move constants from dir.c to stub file (#13312) 2024-02-13 22:07:15 +01:00
Niels Dossche
5941cdaaad Fix ZTS crashes with persistent resources in modules (#13381)
On shutdown in ZTS the following happens:
- https://github.com/php/php-src/blob/master/Zend/zend.c#L1124-L1125
  gets executed. This destroys global persistent resources and destroys
  the modules. Furthermore, the modules are unloaded too.
- Further down, `ts_free_id(executor_globals_id)` gets executed, which
  calls `executor_globals_dtor`. This function destroys persistent
  resources for each thread.

Notice that in the last step, the modules that the persistent resource
belong to may already have been destroyed. This means that accessing
globals will cause a crash (I previously fixed this with ifdef magic),
or when the module is dynamically loaded we'll try jumping to a
destructor that is no longer loaded in memory. These scenarios cause
crashes.

It's not possible to move the `ts_free_id` call upwards, because that
may break assumptions of callers, and furthermore this would deallocate
the executor globals structure, which means that any access to those
will cause a segfault.

This patch adds a new API to the TSRM that allows running a callback on
a certain resource type. We use this API to destroy the persistent
resources in all threads prior to the module destruction, and keep the
rest of the resource dtor intact.

I verified this fix on Apache with postgres, both dynamically and
statically.

Fixes GH-12974.
2024-02-13 21:43:03 +01:00
Niels Dossche
be34b96975 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13344: finfo::buffer(): Failed identify data 0:(null)
2024-02-13 21:21:07 +01:00
Niels Dossche
e71b597f4d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13344: finfo::buffer(): Failed identify data 0:(null)
2024-02-13 21:15:37 +01:00
Niels Dossche
c2b671cb1b Fix GH-13344: finfo::buffer(): Failed identify data 0:(null)
Credits to ranvis for finding the upstream commit that fixes the issue.

This backports 029b82459e

Closes GH-13370.
2024-02-13 21:13:43 +01:00
Niels Dossche
b7c5813c98 Update libmagic to 5.45 (#13369)
* Update libmagic to 5.45

This also cleans up magicdata.patch: changes that are already in upstream file
were removed from that patch file.

There are five (expected) test output changes.
All these were also checked with the file command.

  - bug77961.phpt changes because there's now an early error-return in the
    `if (ts == FILE_BADSIZE) {` branch.
  - cve-2014-1943.phpt and cve-2014-1943-mb.phpt change because now the crafted
    data is recognised as a simh file.
  - bug71434.phpt now properly recognises it as a Python file.
  - ext/fileinfo/tests/finfo_file_basic.phpt more specific mime type.

* Adjust memory requirement for s390x fileinfo run

The larger database causes a higher memory usage.
Similar to 962c082a5b.

* [ci skip] NEWS
2024-02-13 21:11:57 +01:00
Peter Kokot
686916652e Remove obsolete PHP_WITH_SHARED M4 macro (#13380)
This macro is obsolete in favor of the PHP_ARG_WITH macro. It was once
used in combination with the AC_ARG_WITH macro to determine, whether the
extension has been configured as shared.
2024-02-13 19:37:16 +01:00
Máté Kocsis
115c60e0bb Validate constructor property promotion in stubs 2024-02-12 22:43:34 +01:00
haszi
20c49f8524 Move PASSWORD constants to stubs (#13349) 2024-02-12 22:37:32 +01:00
Niels Dossche
c1609976a9 [ci skip] Update UPGRADING.INTERNALS for "%S" modifier 2024-02-12 22:11:01 +01:00
Michael Voříšek
87edeed3b9 Remove UNEXPECTED from typed prop checks
Closes GH-13143
2024-02-12 11:35:43 +01:00
Dmitry Stogov
2289af889c Update IR
IR commit: ab6ebce1cc25f7d2c634bd13af043f76d6ef524e
2024-02-12 12:24:48 +03:00
Dmitry Stogov
a3620cd6e7 Update IR
IR commit: d2ab283e3c3bb4b5ba21701a4d18f14fd9b3d798
2024-02-12 09:36:33 +03:00
Dmitry Stogov
71cccc0bcc Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix TLS access in JIT with MUSL (#13329)
2024-02-12 08:16:46 +03:00
Dmitry Stogov
667b08c953 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix TLS access in JIT with MUSL (#13329)
2024-02-12 08:14:08 +03:00
Dmitry Stogov
94ba883e19 Fix TLS access in JIT with MUSL (#13329) 2024-02-12 08:13:23 +03:00
Peter Kokot
eb76a83008 Remove PHP atomic includes and PHP_DEFINE M4 macro (#13372)
PHP_DEFINE was introduced with the PHP 5 build system
9d9d39a0de and then refactored via
350de12bc2.

This was once used to put defined constants into a single file to have
more fine-graned dependencies (atomic includes). Since no known PHP
extension is using this and it makes very little sense to use this, this
M4 macro can be removed in favor of the Autoconf native way using
AC_DEFINE and the usual included files php_config.h and config.h.

- Generated unused include directory removed
- Remove include dir from DEFS
- Remove also include dir from PDO checks
2024-02-11 22:14:46 +01:00
Peter Kokot
250547c7ab Remove unused symbol HAVE_BSD_ICONV (#13373) 2024-02-11 19:41:45 +01:00
Peter Kokot
1139851a8a Add missing --ini-path and --ini-dir php-config options to man page (#13261) 2024-02-11 11:55:43 +01:00
Ayesh Karunaratne
f6f1f7c109 ext/standard: Minor improvements to phpinfo() output (#13371)
- Change `http://` links to `https://` for php.net and zend.com
 - Remove `<img border=0` attributes as they are no longer in the HTML standard
 - Replace `<font>` tags with `<span>` tags (used for highlight.* INI color value display previews)
2024-02-11 11:05:07 +01:00
Peter Kokot
d2266efe5e Remove redundant libbcmath include definition (#13364)
The libbcmath headers are included relatively.
2024-02-10 20:04:47 +00:00
Peter Kokot
5b9044d81b Remove PHP 4 PDO headers installation (#13367)
This was once used before the PHP_INSTALL_HEADERS macro became available
in PHP 5.1.
2024-02-10 17:37:42 +01:00
Peter Kokot
801787d51d Simplify strcasestr check in fileinfo (#13365)
The strcasestr is not present on Windows and on Solaris 10 until Solaris
11 implementation in string.h.

At this point strcasestr is not used in the bundled libmagic (file)
library due to patch removing the strcasestr usage in file.c, however
future libmagic version bump might need it again. This simplifies the
strcasestr check if available on the system without running the test
code and avoiding the unknown issue when cross-compiling. If found, the
HAVE_STRCASESTR is defined, otherwise the strcasestr.c is added to the
build sources.
2024-02-10 15:11:48 +01:00
Niels Dossche
5e7783e200 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
2024-02-10 14:05:26 +01:00
Niels Dossche
ca60912c8f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
2024-02-10 14:05:19 +01:00
Saki Takamachi
199e48b567 Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
Closes GH-11951.
2024-02-10 14:04:49 +01:00