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

137011 Commits

Author SHA1 Message Date
Niels Dossche
32fe9bc430 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix uninitialized memory in network.c
2024-07-22 22:26:02 +02:00
Niels Dossche
40e0e92212 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix uninitialized memory in network.c
2024-07-22 22:25:53 +02:00
Niels Dossche
40551dd74b Fix uninitialized memory in network.c
See https://github.com/php/php-src/issues/14806#issuecomment-2208150509
and https://github.com/php/php-src/issues/14806#issuecomment-2208690481

Closes GH-15068.
2024-07-22 22:25:28 +02:00
Peter Kokot
40e0d3a276 Autotools: Check for crypt and crypt_r with AC_* macros (#15060)
This checks if crypt and crypt_r functions are available on the system
in default libraries or in the crypt library with the AC_SEARCH_LIBS.
The redundant HAVE_LIBCRYPT symbol is removed.
2024-07-22 21:51:18 +02:00
Peter Kokot
499ea9067d Sync required phar dependencies (#15058)
Required extensions hash and spl are added to the configure phase as
required. They are also already noted as ZEND_MOD_REQUIRED.
2024-07-22 21:30:15 +02:00
David Carlier
21418b5bb5 ext/intl: SpoofChecker::setAllowedChars support.
To limit the acceptable range of acceptable unicode chars via individual
ones or via a pattern.
2024-07-22 19:52:56 +01:00
Arnaud Le Blanc
b537f01353 [ci skip] NEWS 2024-07-22 19:30:32 +02:00
Arnaud Le Blanc
c60dbecb69 Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS
  Hint the opcache shm mapping location only when JIT is enabled
  Fix the JIT buffer relocation failure at the corner case (#11266)
2024-07-22 19:28:52 +02:00
Arnaud Le Blanc
4377dff59c [ci skip] NEWS 2024-07-22 19:28:28 +02:00
Arnaud Le Blanc
ead61c7f29 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Hint the opcache shm mapping location only when JIT is enabled
  Fix the JIT buffer relocation failure at the corner case (#11266)
2024-07-22 19:28:05 +02:00
Arnaud Le Blanc
929536b697 Hint the opcache shm mapping location only when JIT is enabled
Closes GH-14793
Fixes GH-13775
2024-07-22 19:26:54 +02:00
LoongT4o
a924e1c71b Fix the JIT buffer relocation failure at the corner case (#11266)
Avoid missing possible candidates due to the large address range of the free segment.
Eg, 

48000000-49400000 r-xs 08000000 00:0f 39322841               segment1
7ffff2ec8000-7ffff2f49000 rw-p 00000000 00:00 0              segment2
7ffff6fae000-7ffff735c000 r-xp 00200000 08:02 11538515       /usr/local/sbin/php-fpm

original code will miss the opportunity between [7ffff2ec** - 7ffff2ec8000].

Fix issue #11265.

Signed-off-by: Long, Tao <tao.long@intel.com>
Signed-off-by: Dmitry Stogov <dmitrystogov@gmail.com>
2024-07-22 19:17:43 +02:00
Arnaud Le Blanc
f4eb81d70e Followup GH-14996 (#15062) 2024-07-22 19:16:29 +02:00
Niels Dossche
810999ae31 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix bogus fallthrough path in firebird_handle_get_attribute()
2024-07-22 18:33:41 +02:00
Niels Dossche
46924ac9fa Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bogus fallthrough path in firebird_handle_get_attribute()
2024-07-22 18:33:32 +02:00
Niels Dossche
b8e9c5ba6a Fix bogus fallthrough path in firebird_handle_get_attribute()
If getting the version fails, we should return -1 according to
php_pdo_driver.h:259, not fall through to another attribute.

Closes GH-15066.
2024-07-22 18:33:03 +02:00
Bob Weinand
e406ec81f4 Merge branch 'PHP-8.3' 2024-07-22 18:32:04 +02:00
Bob Weinand
61b455b59c Merge branch 'PHP-8.2' into PHP-8.3 2024-07-22 18:30:10 +02:00
Bob Weinand
a18df90a8b Fix GH-13817: Segmentation fault for enabled observers after pass 4
Instead of fixing up temporaries count in between observer steps, just apply the additional temporary in the two affected observer steps.

Closes GH-14018.
2024-07-22 18:28:03 +02:00
Saki Takamachi
f4391d4d2c Fixed segmentation fault when attribute value was not set (#15065) 2024-07-23 01:17:21 +09:00
Niels Dossche
543c4bb7bc Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix passing non-finite timeout values in stream functions
2024-07-22 17:53:00 +02:00
Niels Dossche
a0e1e085d8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix passing non-finite timeout values in stream functions
2024-07-22 17:52:53 +02:00
Niels Dossche
fdcfd62b9b Fix passing non-finite timeout values in stream functions
Closes GH-15061.
2024-07-22 17:52:21 +02:00
Niels Dossche
77f870e98e Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)
2024-07-22 17:45:28 +02:00
Niels Dossche
b2963e96ee Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)
2024-07-22 17:45:20 +02:00
Niels Dossche
c0de7214aa Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)
For top-level anonymous type definition we never store the declaration anywhere
else nor the type anywhere else.
The declaration keeps owning the type and it goes out of scope.
For anonymous fields this gets handled by the add_anonymous_field code that
removes the type from the declaration.
This patch does something similar in the parsing code when it is
detected we're dealing with an anonymous enum in a top-level declaration.

Closes GH-14839.
2024-07-22 17:44:47 +02:00
Peter Kokot
2f0bb9293c Autotools: Append rt library to FPM_EXTRA_LIBS (#15059)
This appends the possible rt library as needed on Solaris <= 10 to
FPM_EXTRA_LIBS instead of the global LIBS variable for all SAPIs to have
cleaner build. The possible required rt library for other SAPIs is also
checked in the configure.ac.
2024-07-22 17:19:55 +02:00
Ilija Tovilo
82479e89d0 Throw error for recursive comparison, instead of fatal (#14989)
I don't understand the rationale of fatal erroring here. It seems this should
properly unprotect the compared elements when returning up the stack.

Related to GH-14980
2024-07-22 15:53:41 +02:00
Dmitry Stogov
e4d86998f6 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix Windows build
2024-07-22 16:41:43 +03:00
Dmitry Stogov
0338e8d4ec Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix Windows build
2024-07-22 16:41:35 +03:00
Dmitry Stogov
d6efff7254 Fix Windows build 2024-07-22 16:41:16 +03:00
Dmitry Stogov
037da5941c Merge branch 'PHP-8.3'
* PHP-8.3:
  Regenerate FFI parser using HEAD version of LLK
2024-07-22 16:02:12 +03:00
Dmitry Stogov
eb7bb586e2 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Regenerate FFI parser using HEAD version of LLK
2024-07-22 16:01:59 +03:00
Dmitry Stogov
13e9b40517 Regenerate FFI parser using HEAD version of LLK 2024-07-22 16:01:26 +03:00
Saki Takamachi
8a4a30469a Zend: Add ZEND_BYTES_SWAP32/ZEND_BYTES_SWAP64 (#14910) 2024-07-22 17:57:16 +09:00
Peter Kokot
fe9fdd4fc3 Autotools: Fix unused result and variables warnings in flush IO check (#15056)
- exit() replaced with regular return since these two behave the same in
  main()
- main(void) used as argc and argv aren't used
- if sentences wrapped in curly brackets for readability
- fgets wrapped in if to check for the return result and omit the
  "ignoring return value of 'fgets' declared with attribute
  'warn_unused_result'..." warnings in the config.log
- fclose(fp) added before returning
2024-07-22 10:00:14 +02:00
Dmitry Stogov
7b25cac32b Update IR
IR commit: 8fb33ceccd39d0052c5949cf96fc135e7ba1fbcb
2024-07-22 09:43:11 +03:00
lwlinux
15470bd16c sapi/cli/php_cli.c: fix typos (#15057) 2024-07-22 06:41:02 +01:00
Peter Kokot
9f74329bb6 Merge branch 'PHP-8.3'
* PHP-8.3:
  Append -Wno-implicit-fallthrough flag conditionally (#13331)
2024-07-22 07:02:25 +02:00
Peter Kokot
f702437cad Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Append -Wno-implicit-fallthrough flag conditionally (#13331)
2024-07-22 06:58:01 +02:00
Peter Kokot
d20d11375f Append -Wno-implicit-fallthrough flag conditionally (#13331)
Older GCC versions (< 7.0) don't support the -Wno-implicit-fallthrough
compiler flag. This adds the flag conditionally in case some other
compiler will run into same issue.

Fixes GH-13330
2024-07-22 06:57:04 +02:00
Peter Kokot
e6089b0920 Add upgrading note about Autoconf cache variables (#14985)
[skip ci]
2024-07-22 02:10:48 +02:00
Peter Kokot
90e63d8a94 [skip ci] Remove GH-14685 artefact 2024-07-22 00:57:34 +02:00
Niels Dossche
af830d866f Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
2024-07-21 22:03:06 +02:00
Niels Dossche
c26d1a36e2 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
2024-07-21 22:02:47 +02:00
Niels Dossche
cfcc2a3fda Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
We were using atoi, which is only for integers. When the size does not
fit in an integer this breaks. Use ZEND_STRTOUL instead. Also make sure
invalid data isn't accidentally parsed into a file size.

Closes GH-15035.
2024-07-21 22:02:11 +02:00
Niels Dossche
9b78e5ff1c Remove useless return 2024-07-21 18:36:19 +02:00
Niels Dossche
186788f149 Fix error handling in tidy constructor 2024-07-21 18:36:19 +02:00
Niels Dossche
1d045a5c97 Use RETVAL_BOOL or RETURN_BOOL in ext/tidy 2024-07-21 18:36:19 +02:00
Niels Dossche
09c0455f64 Consistently check zend_result in the same way 2024-07-21 18:36:19 +02:00