Commit graph

65283 commits

Author SHA1 Message Date
Jakub Zelenka
5c42843c8c Revert "Temporarily disable failing zlib tests on travis (#10738)"
This reverts commit 8c9c6787cc.
2023-11-17 12:43:40 +00:00
Jakub Zelenka
0f349d4c24
Add POSIX_SC_CHILD_MAX and POSIX_SC_CLK_TCK constants
Closes GH-12689
2023-11-17 11:09:30 +00:00
Alexandre Daubois
6f95273941
ext/pdo_mysql: Improve tests cleanup (#11879)
This allows the tests to be run in parallel.
2023-11-16 18:49:43 +00:00
Ilija Tovilo
02494e7657
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Fix more test tmp file conflicts
2023-11-16 16:28:46 +01:00
Ilija Tovilo
8828d6ac1d
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix more test tmp file conflicts
2023-11-16 16:28:40 +01:00
Ilija Tovilo
d5c6633bd1
[skip ci] Fix more test tmp file conflicts 2023-11-16 16:28:12 +01:00
Ilija Tovilo
4a06c1d18b
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix file test race condition
2023-11-16 15:40:48 +01:00
Ilija Tovilo
3060edf6af
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix file test race condition
2023-11-16 15:40:41 +01:00
Ilija Tovilo
a742010a0a
Fix file test race condition
005_variation2.phpt creates files with special names, and
filesize_variation5.phpt checks for filesize of inexistent files with special
names. Create the files in a separate directory to avoid these tests clashing.

Closes GH-12692
2023-11-16 15:40:16 +01:00
Jakub Zelenka
ee56038d38
Merge branch 'PHP-8.3' 2023-11-16 14:37:41 +00:00
Jakub Zelenka
945c512a4e
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-16 14:37:10 +00:00
Jakub Zelenka
bf250e9f88
Merge branch 'PHP-8.1' into PHP-8.2 2023-11-16 14:36:16 +00:00
Jakub Zelenka
b4208c8f96
Initialize syslog device in GINIT
Closes GH-12663
2023-11-16 14:31:44 +00:00
Pengfei Li
f2706a8f30
JIT/AArch64: Fix an undefined symbol issue (#12687)
In AArch64 function `zend_jit_set_veneer()`, some debug code calls two
other functions `ir_disasm_find_symbol()` and `ir_disasm_add_symbol()`
defined in `ir_disasm.c`. However, `ir_disasm.c` is compiled under the
condition that capstone is available. This causes an undefined symbol
issue while loading `opcache.so` when JIT is triggered if PHP is built
without `--with-capstone`.

We find this issue on MacOS 12.5 if we build PHP with Clang 14. It does
not appear immediately when using other versions of toolchains because
of lazy binding. To reproduce this with Linux/GCC, we can disable lazy
binding by `export LD_BIND_NOW=1` before building PHP.

This fixes the issue by making the debug code conditionally compile.
2023-11-16 11:57:09 +03:00
George Peter Banyard
ba204a2e3a
ext/spl: Restructure spl_array.c file to move ArrayObject methods together 2023-11-16 00:41:37 +00:00
Gina Peter Banyard
1bdb0fddc1
Refactor pcntl_sigprocmask()/pcntl_sigwaitinfo()/pcntl_sigtimedwait() (#11860) 2023-11-16 00:40:18 +00:00
Niels Dossche
d882c5d580 Merge branch 'PHP-8.3'
* PHP-8.3:
  Use __DIR__-relative path in tests
  Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
2023-11-15 22:01:05 +01:00
Niels Dossche
c83632a503 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use __DIR__-relative path in tests
  Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
2023-11-15 22:00:44 +01:00
Niels Dossche
f320c3561e Use __DIR__-relative path in tests
Otherwise we can't run them from another directory, they'll fail
instead.
2023-11-15 22:00:04 +01:00
Ilija Tovilo
5aeada0ee3
Fix potentially uninitialized warning on release build 2023-11-15 13:14:55 +01:00
Daniil Gentili
2ca142ecd8
Improve jit tests
Closes GH-12425
2023-11-14 20:09:27 +01:00
Niels Dossche
50c2a9305c
Fix building ext/dom in directory other than src (#12671) 2023-11-14 19:23:10 +01:00
Ilija Tovilo
c3e98092df
[skip ci] Add xleak to xml test due to libxml2 bug 2023-11-14 18:42:00 +01:00
Ilija Tovilo
9f7148ece5
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Further increase allowable atime deviation
2023-11-14 18:37:32 +01:00
Ilija Tovilo
aa452ed315
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Further increase allowable atime deviation
2023-11-14 18:37:17 +01:00
Ilija Tovilo
9b07b013fc
[skip ci] Further increase allowable atime deviation
MSAN is slow in particular, leading to potentially higher deviations.
2023-11-14 18:36:07 +01:00
Remi Collet
74a7b79883
Merge branch 'PHP-8.3'
* PHP-8.3:
  zip extension is 1.22.3
2023-11-14 15:58:27 +01:00
Remi Collet
3d5723e232
zip extension is 1.22.3 2023-11-14 15:58:18 +01:00
Remi Collet
6cbb075ffa
Merge branch 'PHP-8.3'
* PHP-8.3:
  NEWS
  NEWS
  fix GH-12661 (Inconsistency in ZipArchive::addGlob remove_path Option Behavior)
2023-11-14 14:58:11 +01:00
Remi Collet
14f10ec761
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  NEWS
  NEWS
  fix GH-12661 (Inconsistency in ZipArchive::addGlob remove_path Option Behavior)
2023-11-14 14:57:14 +01:00
Remi Collet
ddb887ffc8
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  NEWS
  fix GH-12661 (Inconsistency in ZipArchive::addGlob remove_path Option Behavior)
2023-11-14 14:56:29 +01:00
Remi Collet
6625226074
fix GH-12661 (Inconsistency in ZipArchive::addGlob remove_path Option Behavior) 2023-11-14 14:54:20 +01:00
Dmitry Stogov
94f32df866 Fixed compilation warning 2023-11-14 12:22:38 +03:00
Niels Dossche
1492be5286
[RFC] DOM HTML5 parsing and serialization support (#12111) 2023-11-13 20:18:19 +01:00
Niels Dossche
17d2917fb7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
2023-11-13 19:34:49 +01:00
Niels Dossche
5c25742c26 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
2023-11-13 19:34:40 +01:00
Niels Dossche
86c7d3ed1f Fix GH-12655: proc_open() does not take into account references in the descriptor array
Closes GH-12658.
2023-11-13 19:29:44 +01:00
David CARLIER
cc2bf11951
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and helping array bound checking.
2023-11-13 12:42:45 +00:00
Dmitry Stogov
8349835e68 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
2023-11-13 13:28:48 +03:00
Dmitry Stogov
db26aee801 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
2023-11-13 13:27:11 +03:00
Dmitry Stogov
c60c2a0d67
Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660) 2023-11-13 13:26:17 +03:00
Ilija Tovilo
f8c2d1ec2f
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix astat imperciseness excemption in test
2023-11-12 14:07:17 +01:00
Ilija Tovilo
a687465c45
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix astat imperciseness excemption in test
2023-11-12 14:07:10 +01:00
Ilija Tovilo
d224faa10f
Fix astat imperciseness excemption in test 2023-11-12 14:06:02 +01:00
Ilija Tovilo
a202bf54df
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix undeclared variable in stat tests
2023-11-11 21:01:26 +01:00
Ilija Tovilo
85107c94d1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix undeclared variable in stat tests
2023-11-11 21:01:19 +01:00
Ilija Tovilo
7440a1bd1f
Fix undeclared variable in stat tests
Closes GH-12645
2023-11-11 21:00:50 +01:00
Niels Dossche
f150f99752
Improve browscap get_browser performance (#12651)
* Split function and use _new variant to avoid redundant checks

* Precompute better array size to avoid rehashing

* Use new function to add into array instead of merging into, preventing temporary memory allocations

* Convert to regex without separate copy + lowering

We're already doing a character-wise loop after lowering, so just lower
it character by character instead of looping over it twice and
allocating memory.

* Use HASH_MAP loop because htab can never be packed

This saves additional checks.

* Move destructor to more sensible place

* Remove now unused browscap_zval_copy_ctor

* Use zend_string_release_ex variant where possible

* Implement dedicated greedy wildcard matching algorithm

This avoids compiling, allocating and caching regexes and should run in
the same complexity.

* Cache previous length instead of repeatedly recomputing it

* Add additional optimization to wildcard * matching

* Move cheap checks to the callsite

The function prologue and epilogue have a stupidly high overhead for
those 2 simple checks at the start.

We can't always-inline the reg_compare function because it contains
alloca, and the alloca is really important for performance.
Instead, move those cheap checks to the call site.

* Use specialised loop to avoid unnecessary conversions and checks

* Optimize counting loop by taking into account the prefix

* Precompute the hash values of known keys

* [ci skip] UPGRADING

* Code style

* Add a note why we have the early-skip checks in the loop
2023-11-11 18:44:17 +01:00
Niels Dossche
299a234eb7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:41 +01:00
Niels Dossche
1fb73463d3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:32 +01:00