Commit Graph

134452 Commits

Author SHA1 Message Date
Dmitry Stogov
4630f77ee4 Update IR
IR commit: a746ceb6506b21705bd35473144c60194ae3191d
2023-11-30 21:34:26 +03:00
Niels Dossche
f3ece813ff
Optimize size of ext/dom (#12830)
* Remove unused upper case tag static data

* Shrink size of static binary search tree

This also makes it more efficient on the data cache.

* Update patches
2023-11-29 22:27:00 +01:00
Niels Dossche
37a1e191dd Merge branch 'PHP-8.3'
* PHP-8.3:
  Test fixes for libxml2 2.12.0
2023-11-29 20:53:21 +01:00
Niels Dossche
5be5a3dfdb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Test fixes for libxml2 2.12.0
2023-11-29 20:53:13 +01:00
Niels Dossche
061058a9b1 Test fixes for libxml2 2.12.0 2023-11-29 20:52:01 +01:00
Niels Dossche
ae83d6ab07
Fix issues related to libxml2 2.12.0 (#12802)
* Avoid passing NULL to xmlSwitchToEncoding

This otherwise switches to UTF-8 on libxml2 2.12.0

* Split tests for different error reporting behaviour in libxml2 2.12.0

* Avoid deprecation warnings for libxml2 2.12.0

We can't fully get rid of the parser globals as there are still APIs
that implicitly use them.

* Temporarily disable part of test for libxml 2.12.0 regression

See https://gitlab.gnome.org/GNOME/libxml2/-/issues/634

* Review fixes

* [ci skip] Update test description
2023-11-29 20:46:35 +01:00
Ilija Tovilo
e3de478f66
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix travis_wait
2023-11-29 10:36:15 +01:00
Ilija Tovilo
2751aa3894
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix travis_wait
2023-11-29 10:35:34 +01:00
Ilija Tovilo
706e51ad8a
Fix travis_wait
It seems travis_wait is broken. Output skipped tests to avoid the timeout.

Closes GH-12822
2023-11-29 10:35:09 +01:00
Dmitry Stogov
29a70828b9 Update IR
IR commit: 81047af575864c5dfd5fda62394ada46cc9cae27
2023-11-29 12:27:05 +03:00
yang yuhan
566100d7fe
Enhance moving PHP code pages into huge pages (#12806)
The former implementation of huge pages for PHP code segments may
fail to map in certain scenarios. For instance, if the initial
'r-x-' segment is not PHP, it will result in a failure to map into
huge pages. Consequently, the optimization for huge pages with PHP
code will no longer be effective.

This patch improves the implementation by accurately matching all
'r-x-' segments until it locates the PHP code segment. Subsequently,
it performs the necessary huge page mapping.


Reviewed-by: chen-hu-97 <hu1.chen@intel.com>

Signed-off-by: PeterYang12 <yuhan.yang@intel.com>
2023-11-29 10:49:23 +03:00
Ilija Tovilo
407fba9a64
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Skip resource intensive tidy test on GA
2023-11-29 00:27:54 +01:00
Ilija Tovilo
340c58de98
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip resource intensive tidy test on GA
2023-11-29 00:27:44 +01:00
Ilija Tovilo
752192700f
[skip ci] Skip resource intensive tidy test on GA 2023-11-29 00:27:17 +01:00
Dmitry Stogov
8495522963 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
2023-11-28 23:34:45 +03:00
Dmitry Stogov
64851873da Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
2023-11-28 23:33:45 +03:00
Dmitry Stogov
423a1e586e Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W 2023-11-28 22:49:39 +03:00
Alex Dowad
175b438abe Fix spurious failures of php-fuzz-mbstring 2023-11-28 21:04:17 +02:00
Niels Dossche
f1bc43b418
Use size_t for string lengths in ext/xml compat layer (#12808)
This is _not_ exploitable right now because libxml guarantees right now
a maximum string length of 1M bytes. But if that limit were to ever
change this could overflow in the future leading to exploits.
Again, not exploitable right now, but just making it more future-proof.
2023-11-28 19:51:25 +01:00
Niels Dossche
803cd824e5
Optimizations for mb_trim (#12803)
* Fast path for when there is nothing to trim in mb_trim

* Make mb_trim decide between linear search vs hash table lookup

Using empirical experiments I noticed that on my i7-4790 the hash table
approach becomes faster once we have more than 4 code points in the trim
characters, when evaluated on the worst case.

This patch changes the logic so that a hash table is used for a large
number of trim characters, and linear search when the number of trim
characters is <= 4.
2023-11-28 19:49:36 +01:00
Dmitry Stogov
fc1b467d0b Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817)
2023-11-28 21:46:37 +03:00
Dmitry Stogov
8b5767af75 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817)
2023-11-28 21:20:35 +03:00
Dmitry Stogov
39a813d9ca
Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817)
* Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning

* Fixed register names
2023-11-28 21:19:57 +03:00
Dmitry Stogov
d41ee53aaf Fixed GH-12809: Segmentation fault in exception handler with CALL VM on AArch64 2023-11-28 12:57:00 +03:00
Niels Dossche
6bd680b824 [ci skip] NEWS
For acbdfd24ec.
2023-11-28 08:19:46 +01:00
Ilija Tovilo
bea567674c
Merge branch 'PHP-8.3'
* PHP-8.3:
  Reduce parallelism on frequently crashing jobs
2023-11-28 00:31:51 +01:00
Ilija Tovilo
de0cef4a09
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Reduce parallelism on frequently crashing jobs
2023-11-28 00:31:14 +01:00
Ilija Tovilo
ace91ddd73
Reduce parallelism on frequently crashing jobs
Some jobs on GA apparently consume a lot of CPU resources, possibly hindering
communication between master and runner. This only seems to happen on Linux+ASAN
and macOS. For these jobs, keep one core idle.

Closes GH-12742
2023-11-28 00:27:24 +01:00
Ilija Tovilo
1ade8ef7d3
[skip ci] Skip failing date test on 32-bit 2023-11-28 00:26:30 +01:00
Daniil Gentili
fde41bc713
Report fatal error if JIT cannot be enabled
Closes GH-12403
2023-11-28 00:21:26 +01:00
Dmitry Stogov
e2e433a514 Fix test 2023-11-28 02:00:47 +03:00
Dmitry Stogov
701f8cbef2 Fixed broken test 2023-11-28 01:21:36 +03:00
Dmitry Stogov
25de668621 Merge branch 'PHP-8.3'
* PHP-8.3:
  Align error messages between normal VM and JIT for RW when using object as array (#12799)
2023-11-28 00:40:57 +03:00
Dmitry Stogov
f4b473ca71 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Align error messages between normal VM and JIT for RW when using object as array (#12799)
2023-11-28 00:40:48 +03:00
Gina Peter Banyard
e94ab0461c
Align error messages between normal VM and JIT for RW when using object as array (#12799) 2023-11-28 00:37:21 +03:00
Máté Kocsis
02bca09bc1
Add class aliases into the classmap of gen_stub.php
Now that we have class aliases (DOMNode -> DOM\Node), it has become important to add them to the class map so that it will be possible to generate class synopses for them.
2023-11-27 22:13:35 +01:00
Máté Kocsis
164995effe
Fix ext/dom object hierarchy
gen_stub.php references classes inside namespaces relatively
2023-11-27 22:09:31 +01:00
Dmitry Stogov
8f5156fcba Fixed trace type inference 2023-11-27 22:52:12 +03:00
Alex Dowad
26b4130f4a Merge branch 'PHP-8.3'
* PHP-8.3:
  Return value of mb_get_info can be NULL
2023-11-27 21:20:38 +02:00
Alex Dowad
31d43164e8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Return value of mb_get_info can be NULL
2023-11-27 21:13:21 +02:00
Alex Dowad
d8ef868b92 Return value of mb_get_info can be NULL
This has been the case at least since PHP 5.4. Thanks to Girgias for
pointing it out.

It appears that there are several global variables internal to mbstring
which can be queried via mb_get_info() and which could be NULL, but
at the very least, we know that "mbstring.http_input" is one of them.
2023-11-27 20:53:37 +02:00
David Carlier
2ef4785dac Merge branch 'PHP-8.3' 2023-11-27 18:20:38 +00:00
David Carlier
be2d460979 Merge branch 'PHP-8.2' into PHP-8.3 2023-11-27 18:20:27 +00:00
David Carlier
b12c85293d Merge branch 'PHP-8.1' into PHP-8.2 2023-11-27 18:19:02 +00:00
ddv
3f57bd80f6 Fix phpGH-12763: PGSQL pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given. 2023-11-27 18:18:46 +00:00
Dmitry Stogov
e30d78f332 Fixed incorrect guard elimination
Fixes oss-fuzz #64414
2023-11-27 21:12:04 +03:00
Gina Peter Banyard
298bba5319
Merge branch 'PHP-8.3'
* PHP-8.3:
  jit: fixed JIT "Attempt to assign property of non-object" warning emitted at the same time as Error is being thrown
2023-11-27 16:21:01 +00:00
Gina Peter Banyard
c70219e4aa
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  jit: fixed JIT "Attempt to assign property of non-object" warning emitted at the same time as Error is being thrown
2023-11-27 16:20:44 +00:00
Gina Peter Banyard
126a255d66
jit: fixed JIT "Attempt to assign property of non-object" warning emitted at the same time as Error is being thrown 2023-11-27 16:19:35 +00:00
Gina Peter Banyard
bd2c970e7e
Merge branch 'PHP-8.3'
* PHP-8.3:
  jit: fixed "Uninitialized string offset" warning being emitted at the same time as invalid offset Error
2023-11-27 16:07:53 +00:00