Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jun 6, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

petk and others added 5 commits June 6, 2025 13:51
This is backport for 8.3 of b222c02
that originally targeted only 8.4+. This is however a bug fix.

Following 68f6ab7, 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.
@pull pull bot added the ⤵️ pull label Jun 6, 2025
NickSdot and others added 24 commits June 7, 2025 07:31
coming from callback arguments when its return type is incorrect.

close GH-18796
`call_user_function` already makes a copy to the call frame for its
arguments, there's no need to do this ourselves.
Is supposed to be Pdo_Sqlite::createCollation but behavior differs in
regard of return type checks.

close GH-18799
Fixes a long-standing TODO, and is faster.
Closes GH-18756.

Co-authored-by: Arnaud Le Blanc <[email protected]>
The array is initialized but not freed.

Closes GH-18787.
* PHP-8.3:
  pdo_odbc: Fix memory leak if WideCharToMultiByte() fails
  Fix memory leak on php_odbc_fetch_hash() failure
  Do not delete main chunk in zend_gc
* PHP-8.4:
  pdo_odbc: Fix memory leak if WideCharToMultiByte() fails
  Fix memory leak on php_odbc_fetch_hash() failure
  Do not delete main chunk in zend_gc
GAS started checking the relocation for tlsgd: it must use the %rdi
register. However, the inline assembly now uses %rax instead.
Fix it by changing the "=a" output register to "=D".
Source: https://github.com/bminor/binutils-gdb/blob/ec181e1710e37007a8d95c284609bfaa5868d086/gas/config/tc-i386.c#L6793

gottpoff is unaffected.

Closes GH-18779.
* PHP-8.3:
  Fix GH-18743: Incompatibility in Inline TLS Assembly on Alpine 3.22
* PHP-8.4:
  Fix GH-18743: Incompatibility in Inline TLS Assembly on Alpine 3.22
Currently, this fails because the type is IS_REFERENCE instead of
IS_ARRAY, but this could be confusing because a function return value is
normally dereferenced automatically in a lot of cases.

Closes GH-18762.
The poison feature relies on ZEND_MM_CUSTOM=1.
If ZEND_MM_CUSTOM=0, the build fails.
To fix this, move some `#endif`.
* PHP-8.3:
  Fix test conflict between copy_variation2-win32-mb.phpt and copy_variation2-win32.phpt
ndossche and others added 29 commits June 9, 2025 17:28
* PHP-8.3:
  zend_alloc: Fix compile with ZEND_MM_STAT=0
* PHP-8.4:
  zend_alloc: Fix compile with ZEND_MM_STAT=0
allow to check if a statement is still running before reusage.

close GH-18804
This doesn't actually matter because both `*sal` and `**sal` are pointer
sized, but this makes analysers happy.
Fixes bug #68866.

Closes GH-18816.
* PHP-8.3:
  Fix technically incorrect sizeof
* PHP-8.4:
  Fix technically incorrect sizeof
Introduced in 5544be7. Trimming to simplify
the diff of the pipe operator RFC implementation.
Co-authored-by: Gina Peter Banyard <[email protected]>
Co-authored-by: Arnaud Le Blanc <[email protected]>
Co-authored-by: Tim Düsterhus <[email protected]>
Cherry-pick lexbor/lexbor@b2dbadc

Adding support for IDNA URL serialization.
> PHP Warning:  Undefined variable $code in build/gen_stub.php on line 5322

Introduced in #18735.
This allows a cheaper exception check and also does not need a release
call.
This shrinks concat_function() on x86-64 with GCC 15.1.1 from 3443 bytes
to 3332 bytes.
It's possible to return a reference from __toString(), but this is not
handled and results in a (confusing) error telling that the return value
must be a string.
Properly handle this by unwrapping the reference.

Closes GH-18810.
* PHP-8.4:
  cli: Fix tests/bug80092.phpt expectation for `PHP_BUILD_PROVIDER` (#18824)
This hack not only breaks the handling of custom allocators, but also
breaks if zend_alloc is compiled with USE_CUSTOM_MM.
This hack is just no good, if you want leak information then use ASAN.

Closes GH-18813.
* PHP-8.3:
  Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0
* PHP-8.4:
  Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0
….h(75): error C2122: 'message': prototype parameter in name list illegal

INTERNAL_FUNCTION_PARAMETERS is defined in zend.h, but not included in
zend_exceptions.h (and it shouldn't). Expand the macro to fix the
compile issue.
We can avoid creating temporary strings, and then reparsing them into
numbers with zend_symtable_update() by using zend_hash_index_update()
directly.

For the following benchmark on an i7-4790:
```php
$file = str_repeat('A', 100000);
for ($i=0;$i<100;$i++) unpack('C*',$file);
```

I get:
```
Benchmark 1: ./sapi/cli/php y.php
  Time (mean ± σ):      85.8 ms ±   1.8 ms    [User: 74.5 ms, System: 10.4 ms]
  Range (min … max):    83.8 ms …  92.4 ms    33 runs

Benchmark 2: ./sapi/cli/php_old y.php
  Time (mean ± σ):     318.3 ms ±   2.7 ms    [User: 306.7 ms, System: 9.9 ms]
  Range (min … max):   314.9 ms … 321.6 ms    10 runs

Summary
  ./sapi/cli/php y.php ran
    3.71 ± 0.08 times faster than ./sapi/cli/php_old y.php
```

On an i7-1185G7 I get:
```
Benchmark 1: ./sapi/cli/php test.php
  Time (mean ± σ):      60.1 ms ±   0.7 ms    [User: 47.8 ms, System: 12.0 ms]
  Range (min … max):    59.2 ms …  63.8 ms    48 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Benchmark 2: ./sapi/cli/php_old test.php
  Time (mean ± σ):     220.8 ms ±   2.2 ms    [User: 209.6 ms, System: 10.7 ms]
  Range (min … max):   218.5 ms … 224.5 ms    13 runs

Summary
  ./sapi/cli/php test.php  ran
    3.67 ± 0.06 times faster than ./sapi/cli/php_old test.php
```
If s is not NULL, the length can't be <= 0 because we at least append
`spkac` in the string, which is non-empty.
I noticed this condition because if it were actually possible to
execute, then it would leak memory.
They serve no purpose and are just confusing
And use char instead of widening to int for no reason
@pull pull bot merged commit def3a95 into wudi:master Jun 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.