Commit Graph

131523 Commits

Author SHA1 Message Date
Dmitry Stogov
1e55c97601 Fixed type inference
Fixes oss-fuzz #64577, #64579, #64589
2023-12-01 17:08:16 +03:00
Niels Dossche
9a69bb2d58 Add missing NULL checks for spl autoload table
Closes GH-12840.
2023-12-01 09:09:17 +01:00
Niels Dossche
bedf1083f3 Add missing NULL pointer checks related to the previous call frame 2023-12-01 09:08:47 +01:00
Niels Dossche
061058a9b1 Test fixes for libxml2 2.12.0 2023-11-29 20:52:01 +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
Ilija Tovilo
752192700f
[skip ci] Skip resource intensive tidy test on GA 2023-11-29 00:27:17 +01: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
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
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
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
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
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
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
ed8b901869
jit: fixed "Uninitialized string offset" warning being emitted at the same time as invalid offset Error 2023-11-27 16:04:41 +00:00
Niels Dossche
6a914cb7a5 Fix GH-12791: Possible dereference of NULL in MySQLnd debug code
Closes GH-12794.
2023-11-27 14:01:46 +01:00
Niels Dossche
ebb4488def Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Avoid using uninitialised struct
2023-11-25 20:08:01 +01:00
Mikhail Galanin
7e7817bc2f Avoid using uninitialised struct
Closes GH-12046.
2023-11-25 20:07:14 +01:00
Bob Weinand
c572613596 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-25 18:48:57 +01:00
Bob Weinand
d404e1d1ee USE_ZEND_ALLOC=1 in tests with zend_test.observe_opline_in_zendmm=1 2023-11-25 18:44:45 +01:00
Bob Weinand
50ccea31f2 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-25 00:59:26 +01:00
Bob Weinand
1305ea23ce Add NEWS entry for GH-12768 2023-11-25 00:57:22 +01:00
Florian Engelhardt
8d2df86b06
Fix invalid opline in OOM handlers within ZEND_FUNC_GET_ARGS and ZEND_BIND_STATIC (#12768)
* fix segfault in `ZEND_BIND_STATIC`

In case a `ZEND_BIND_STATIC` is being executed, while the current chunk is full,
the `zend_array_dup()` call will trigger a OOM in ZendMM which will crash, as
the opline might be a dangling pointer.

* add missing test

* `assert()`ing seems easier than trying to make the compiler to not optimize

* moved from function call to INI setting, so we can use this in other places as well

* make `assert()` work no NDEBUG builds

* document magic number

* fix segfault in `ZEND_FUNC_GET_ARGS`

In case a `ZEND_FUNC_GET_ARGS` is being executed, while the current chunk is
full, the `zend_new_array()` call will trigger a OOM in ZendMM which will crash,
as the opline might be a dangling pointer.

---------

Co-authored-by: Florian Engelhardt <florian@engelhardt.tc>
2023-11-25 00:54:02 +01:00
Derick Rethans
73246bac00 Update NEWS 2023-11-23 16:18:34 +00:00
Derick Rethans
7f96f4b3a3 Merge branch 'import-timelib-2022-10' into PHP-8.2 2023-11-23 16:17:26 +00:00
Derick Rethans
28dabaab2f Import timelib 2022.10 2023-11-23 16:06:00 +00:00
Ben Ramsey
20eff14c5c
Merge branch 'PHP-8.1' into PHP-8.2 2023-11-22 21:35:39 -06:00
Dmitry Stogov
87107f8688
Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error 2023-11-22 21:11:49 -06:00
Muhammad Moinur Rahman
fafa34d9cd
Add host_cpu type for FreeBSD
In FreeBSD world x86_64 host type is identified as amd64 so add proper
checks for FreeBSD amd64 hosts.

Close GH-12736
2023-11-22 21:10:52 -06:00
Ilija Tovilo
daa38dd63e
Fix in-place modification of filename in php_message_handler_for_zend
php_strip_url_passwd modifies url in-place. We cannot assume from
php_message_handler_for_zend that data is a temporary, modifiable string.

Fixes oss-fuzz #64209
Closes GH-12733
2023-11-22 21:09:42 -06:00
Ilija Tovilo
1fdcfa4ebe
Fix use-after-free of name in var-var with malicious error handler
Fixes oss-fuzz #54325
Closes GH-12732
2023-11-22 21:08:55 -06:00
Jakub Zelenka
55e0748487
Fix #50713: openssl_pkcs7_verify() may ignore untrusted CAs
Closes GH-12499
2023-11-22 21:03:55 -06:00
Ben Ramsey
2b4a47ccec
Merge changes to CertificateGenerator.inc from PHP-8.2
This pulls only the changes made to CertificateGenerator.inc in the PHP-8.2
branch from commit 505e8d2a04.

Co-authored-by: Jakub Zelenka <bukka@php.net>
2023-11-22 20:39:30 -06:00
Niels Dossche
243fa9c143
Fix GH-12616: DOM: Removing XMLNS namespace node results in invalid default: prefix
The namespace data is freed and set to NULL, but there remain references
to the namespace declaration nodes. This (rightfully) confuses libxml2
because its invariants are broken. We also have to remove all remaining
references from the subtree. This fixes the data corruption bug.

Closes GH-12681.
2023-11-22 20:39:30 -06:00
Niels Dossche
6a76e5d0a2
Fix GH-12702: libxml2 2.12.0 issue building from src
Fixes GH-12702.

Co-authored-by: nono303 <github@nono303.net>
2023-11-22 20:39:30 -06:00
Jakub Zelenka
e43ffb5023
Fix stream fclose_stdiocast_flush_in_progress type 2023-11-22 20:39:30 -06:00
Jakub Zelenka
a7a6151c4f
Fix bug #79945: Stream wrappers in imagecreatefrompng causes segfault
Closes GH-12696
2023-11-22 20:39:30 -06:00
Ilija Tovilo
0b754fc48c
Temporarily disable failing zlib tests on travis (#10738) 2023-11-22 20:39:30 -06:00
Jakub Zelenka
e41cbd2174
Skip slow tests on Travis
Closes GH-12697
2023-11-22 20:39:30 -06:00
Ilija Tovilo
05ba461524
[skip ci] Fix more test tmp file conflicts 2023-11-22 20:39:29 -06:00
Ilija Tovilo
2312637496
Retry tests on deadlock
Closes GH-12693
2023-11-22 20:39:29 -06:00
Ilija Tovilo
e1e140f2f2
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-22 20:39:29 -06:00
Niels Dossche
4f5ba054ba
Use __DIR__-relative path in tests
Otherwise we can't run them from another directory, they'll fail
instead.
2023-11-22 20:39:29 -06:00
Niels Dossche
df2af7ff65
Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
Have to use file_put_contents() instead of --FILE-- because we have to
actually load it using the exec command, *and* have to make multiple
files, and note that we can only load files relative from the current
directory, so we can't rely on files being in the sapi/phpdbg/tests
folder.

Closes GH-12680.
2023-11-22 20:39:29 -06:00
Ilija Tovilo
9bdd0f0de9
Automatically mark tests as flaky
Marking all of these tests as flaky is annoying, so attempt to recognize them
automatically.

Closes GH-12638
2023-11-22 20:39:29 -06:00
Ilija Tovilo
28c312c994
[skip ci] Further increase allowable atime deviation
MSAN is slow in particular, leading to potentially higher deviations.
2023-11-22 20:39:29 -06:00
Niels Dossche
c376f9943f
Fix GH-12655: proc_open() does not take into account references in the descriptor array
Closes GH-12658.
2023-11-22 20:39:28 -06:00
Ilija Tovilo
fe34dd1b49
Fix astat imperciseness excemption in test 2023-11-22 20:39:28 -06:00
Ilija Tovilo
f7f9401cc8
Disable -fsanitize=function on Clang 17
Closes GH-12642
2023-11-22 20:39:28 -06:00
Ilija Tovilo
db8c91ae9f
Fix undeclared variable in stat tests
Closes GH-12645
2023-11-22 20:39:28 -06:00