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

309 Commits

Author SHA1 Message Date
Niels Dossche 6cac6d49ce Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix assertion failures resulting in crashes with stream filter object parameters
2025-11-17 18:24:34 +01:00
Niels Dossche 48d80d2729 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix assertion failures resulting in crashes with stream filter object parameters
2025-11-17 18:24:13 +01:00
Niels Dossche 93ce0500aa Fix assertion failures resulting in crashes with stream filter object parameters
This works for dynamic props but not for non-dynamic props due to the
missing INDIRECT handling.

Closes GH-20500.
2025-11-17 18:23:43 +01:00
Niels Dossche cda8daaccf Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update zlib test to use separate file for flock()
2025-11-01 09:30:54 +01:00
Niels Dossche 981b8c65ed Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Update zlib test to use separate file for flock()
2025-11-01 09:30:11 +01:00
Niels Dossche be8c8a9d6b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update zlib test to use separate file for flock()
2025-11-01 09:30:04 +01:00
Niels Dossche df423e4f08 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Update zlib test to use separate file for flock()
2025-11-01 09:29:55 +01:00
Niels Dossche c3d6bf65d5 Update zlib test to use separate file for flock()
This should prevent the nightly failures that fail with permission
denied on platforms with mandatory locks.

Closes GH-20351.
2025-11-01 09:29:45 +01:00
David Carlier ed9c1b87ee Merge branch 'PHP-8.4' into PHP-8.5 2025-09-29 22:48:55 +01:00
David Carlier 03de7b0b28 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-29 22:48:38 +01:00
David Carlier 93bac8cb1a Fix GH-19922: gzopen() double free
close GH-19924
2025-09-29 22:47:29 +01:00
Gina Peter Banyard 5bd18e3fdc ext/zlib: Refactor tests (#18887)
- Use INI sections
- Use CGI sections
- Move data into a subfolder
- Remove ZPP tests
- Fix various bugs within tests
- Simplify some


Found while working on #18879
2025-06-21 18:03:50 +01:00
Gina Peter Banyard 556e4d9008 streams: Indicate which argument fails the stream ZPP check 2025-03-24 22:54:34 +00:00
Niels Dossche 78d934ad8e Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix memory leak when encoding check fails
2025-02-13 19:11:08 +01:00
Niels Dossche 902e01f4f9 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak when encoding check fails
2025-02-13 19:10:46 +01:00
ndossche a54af45a41 Fix memory leak when encoding check fails
zlib_create_dictionary_string() allocates memory, so we can leak memory
if there's an early exit before the assignment to the return value.
Solve this by moving all validation upwards.

Closes GH-17788.
2025-02-13 19:10:17 +01:00
Niels Dossche 4d3d0aeb66 Add test for mandatory zlib locks
Windows has mandatory locks, so we can test the exclusive lock reliably.
2025-02-11 21:56:48 +01:00
Niels Dossche 6c706c5714 Implement GH-17668: zlib streams should support locking 2025-02-11 21:56:41 +01:00
Niels Dossche 34e1c590cb Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-17747: Exception on reading property in register-based FETCH_OBJ_R breaks JIT
  Fix GH-17745: zlib extension incorrectly handles object arguments
2025-02-11 21:55:51 +01:00
Niels Dossche 0e0d2d21b7 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17745: zlib extension incorrectly handles object arguments
2025-02-11 21:53:52 +01:00
Niels Dossche 4b5c29ef50 Fix GH-17745: zlib extension incorrectly handles object arguments
Because of the "H" modifier in ZPP, there are two bugs:

1) The stub is wrong and will cause a crash in debug mode.
2) Non-dynamic properties are not read correctly because they are not
   DEINDIRECTed.

Closes GH-17750.
2025-02-11 21:52:53 +01:00
Niels Dossche f926c5ce81 Fix GH-16883: gzopen() does not use the default stream context when opening HTTP URLs
Otherwise it's not possible to control the context; it's also consistent
with how the standard open functions work.

Closes GH-17589.
2025-01-27 19:25:52 +01:00
Christoph M. Becker a7918a7ac3 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16326: Memory management is broken for bad dictionaries
2024-10-13 02:30:38 +02:00
Christoph M. Becker 631c04e690 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16326: Memory management is broken for bad dictionaries
2024-10-13 02:29:22 +02:00
Christoph M. Becker d94be24f30 Fix GH-16326: Memory management is broken for bad dictionaries
We must not `efree()` `zend_string`s, since they may have a refcount
greater than one, and may even be interned.

We also must not confuse `zend_string *` with `zend_string **`.

And we should play it safe by using `safe_emalloc()` to avoid
theoretical integer overflows.

We also simplify a bit, according to suggestions of @TimWolla.

Closes GH-16335.
2024-10-13 02:28:07 +02:00
Peter Kokot 13f041163c Remove Travis artefacts (#15714)
Travis was suspended https://github.com/php/php-src/pull/15314

This removes 404 errored Travis image in README, travis configuration
directory and YAML file and usages in tests.

[skip ci]

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-09-04 01:15:10 +02:00
Niels Dossche e4904a2199 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix test conflict between gzfile_basic.phpt and gzfile_basic2.phpt
2024-07-06 01:59:46 +02:00
Niels Dossche 7c970f063f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test conflict between gzfile_basic.phpt and gzfile_basic2.phpt
2024-07-06 01:59:40 +02:00
Niels Dossche 1e5f46fb20 Fix test conflict between gzfile_basic.phpt and gzfile_basic2.phpt
[ci skip]

This should fix the nightly failure.
2024-07-06 01:59:32 +02:00
Remi Collet 9e132582a1 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13217 Test failure with zlib-ng
2024-03-05 10:13:57 +01:00
Remi Collet 6a3c083200 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13217 Test failure with zlib-ng
2024-03-05 10:13:40 +01:00
Remi Collet 5e12844d4d Fix GH-13217 Test failure with zlib-ng
As compressed result may be different
- drop or relax expectations on compressed data
- rely on uncompressed result of compressed data
2024-03-05 10:13:22 +01:00
Ilija Tovilo 0b754fc48c Temporarily disable failing zlib tests on travis (#10738) 2023-11-22 20:39:30 -06:00
Jakub Zelenka 62b2ad4b8a Merge branch 'PHP-8.3' 2023-11-17 13:42:59 +00:00
Jakub Zelenka 7abe3fe4c6 Merge branch 'PHP-8.2' into PHP-8.3 2023-11-17 13:41:50 +00:00
Ilija Tovilo c442a1f18e Temporarily disable failing zlib tests on travis (#10738) 2023-11-17 13:24:20 +00:00
Jakub Zelenka d75240634d Merge branch 'PHP-8.3' 2023-11-17 12:46:30 +00:00
Jakub Zelenka 59dcb0065d Revert "Temporarily disable failing zlib tests on travis (#10738)"
This reverts commit 8c9c6787cc.
2023-11-17 12:45:09 +00:00
Ilija Tovilo f39b5c4c25 Close PHP tags in tests
Closes GH-12422
2023-10-18 17:34:10 +02:00
Ilija Tovilo fc9266a5fc Move ASAN built to GitHub actions
Cirrus will no longer offer unlimited free builds starting next month. We don't
have an alternative for FreeBSD and ARM, so move what we can for now.

Closes GH-11898
2023-08-09 14:06:36 +02:00
Ilija Tovilo 8c9c6787cc Temporarily disable failing zlib tests on travis (#10738) 2023-03-01 02:19:29 +01:00
Ilija Tovilo 743d3780c6 Add clang ASAN/UBSAN push job
Closes GH-9507
2022-09-14 23:55:46 +02:00
Christoph M. Becker 8009b216e9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7953: ob_clean() only does not set Content-Encoding
2022-02-03 16:13:11 +01:00
Christoph M. Becker 9bd468da63 Fix GH-7953: ob_clean() only does not set Content-Encoding
If an output handler has not yet been started, calling `ob_clean()`
causes it to start.  If that happens, we must not forget to set the
`Content-Encoding` and `Vary` headers.

Closes GH-7960.
2022-02-03 16:09:00 +01:00
Nikita Popov 9871a624bf Clean up some more function_exists() checks 2021-06-14 15:47:08 +02:00
Nikita Popov 6600ad6067 Add some missing EXTENSIONS sections to misc tests 2021-06-14 14:52:44 +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 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