Christoph M. Becker
e76ddbd2f6
Prevent strict interpretation of tentative definition
...
This header declaration is never supposed to be interpreted as
definition; otherwise, the handlers are not properly initialized, what
happens, for instance, with ASan instrumented MSVC builds.
Closes GH-7827.
2021-12-26 16:41:25 +01:00
Christoph M. Becker
fd3fc5c193
Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file
...
Like `hash_file()`, `hash_hmac_file()` expects a filename, and not some
string data. Fixing this now, constitutes a (hopefully small) BC break
though.
Closes GH-7828.
2021-12-26 12:55:53 +01:00
Christoph M. Becker
b4ba65dd9d
Fix chunk_split_variation*_32bit.phpt for Windows
...
Both tests fail on Windows for slightly different reasons, what appears
to be legit, and as such we fix the test expectations.
Closes GH-7830.
2021-12-26 12:05:52 +01:00
Dmitry Stogov
2b81156f2a
Fix memory leak in SCCP
...
Fixes oss-fuzz #42878
2021-12-24 13:10:22 +03:00
David Carlier
3f0bb67361
Avoid void* arithmetic in sockets/multicast.c on NetBSD
...
On NetBSD, ifconf.ifc_buf member, unlike most of platforms, is a void
pointer.
We also fix the cpuinfo declarations with empty parameter lists.
Closes GH-7819.
2021-12-23 16:17:30 +01:00
Christophe Coevoet
096a01c905
[ci skip] Update the min curl version in the sync-constants.php script
...
PHP 8.0 bumped the min curl version to 7.29.0
Closes GH-7805.
2021-12-23 13:43:32 +01:00
Christoph M. Becker
c5f4ee50ab
$context parameter of get_headers() is nullable
...
Closes GH-7813.
2021-12-23 11:47:20 +01:00
David Carlier
80b02275bb
socket cmsg credential test fixes, "backporting" from the FreeBSD PR.
2021-12-21 07:27:59 +01:00
David Carlier
51647eb23e
socket: ancillary credentials build fix for non linux systems.
...
for systems using SO_PASSCRED sockopt flag but not using ucred struct.
2021-12-21 07:25:43 +01:00
Dmitry Stogov
cb10ac1d53
Fixed compilation warning
2021-12-21 00:02:45 +03:00
Dmitry Stogov
6d5922bed5
JIT: Fix incorrect JIT prologur size for CLANG/x86 build
...
Fixes oss-fuzz #42724
2021-12-20 23:52:46 +03:00
Dmitry Stogov
e004e844f7
Fix incorrect optimization of ASSIGN_OP that may lead to memory leak
...
Fixes oss-fuzz #42506
2021-12-20 15:06:32 +03:00
Dmitry Stogov
7c674e1aa7
JIT: Fix register clobbering
...
Fixes oss-fuzz #42657
2021-12-20 12:48:48 +03:00
Dmitry Stogov
f18bb2477f
Fix type inference for INIT_ARRAY with invalid index
...
Fixes oss-fuzz #42568
2021-12-20 11:40:11 +03:00
Yifan Tong
3587e13ab3
Fix FILTER_FLAG_NO_RES_RANGE flag
...
`2001:10::/28` is a reserved IPv6 range. But there's a typo in GH-7476,
which caused IPv6 address like `240b:0010::1` will be filtered by the
flag `FILTER_FLAG_NO_RES_RANGE`.
http://www.faqs.org/rfcs/rfc6890.html
Closes GH-7790.
2021-12-19 16:24:34 +01:00
Dmitry Stogov
66306030ad
JIT: Fix incorrect type store elimination
...
Fixes oss-fuzz #42388
2021-12-17 12:31:48 +03:00
Christoph M. Becker
49380b59d2
Fix #81679 : Tracing JIT crashes on reattaching
...
When a new process reattaches to OPcache, tracing JIT causes segfaults,
because each new process allocates its own `zend_jit_traces` and
`zend_jit_exit_groups` in SHM, although these need to be shared between
all processes.
We solve that by only allocating these structs for the first process,
and store the pointers in `accel_shared_globals`, so we can reassign
them when a new process reattaches.
Closes GH-7776.
2021-12-15 15:37:23 +01:00
Dmitry Stogov
cd8e6f5f7b
Preloading: don't remove INCLUDE_OE_EVAL nstructions with used result
2021-12-14 11:36:33 +03:00
Dmitry Stogov
fe320e83ae
Tracing JIT: Fix reference counting
...
Fixes oss-fuzz #42225
2021-12-13 16:28:45 +03:00
Dmitry Stogov
cbc0b1afeb
Fix array clobering by user error handler
...
Fixes oss-fuzz #42234
2021-12-13 14:59:30 +03:00
Dmitry Stogov
230de7721f
Fix incorrect optimization that leads to memory leak
...
Fixes oss-fuzz #42221
2021-12-13 13:08:05 +03:00
Dmitry Stogov
e79dbe1124
JIT: Fix crash during compilation of function with incompletely constructed SSA
...
Fixes oss-fuzz #42200
2021-12-13 11:49:51 +03:00
Christoph M. Becker
c435e67746
Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
...
We must not use the TSRM accessor macros in GINIT and GSHUTDOWN, but
rather use the passed pointers directly. For simplicity, we inline
`php_oci_cleanup_global_handles()`, and also the `PHP_OCI_CALL()`
macros; the latter are unlikely to be needed here, but don't hurt.
Closes GH-7766.
2021-12-12 22:38:00 +01:00
Christoph M. Becker
0b3a937670
Fix GH-7759: Incorrect return types for hash() and hash_hmac()
...
`hash()` and `hash_hmac()` never return `false`; only `hash_file()` and
`hash_hmac_file()` return `false` in case the data cannot be read.
Closes GH-7760.
2021-12-12 15:39:55 +01:00
SATO Kentaro
778513f605
Fix error message allocation of PDO PgSQL
...
Closes GH-7723.
2021-12-12 15:17:36 +01:00
Christoph M. Becker
2c2b0abd4a
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix openssl_x509_checkpurpose_basic.phpt
2021-12-12 14:27:07 +01:00
Christoph M. Becker
98175fc7f1
Fix openssl_x509_checkpurpose_basic.phpt
...
This test fails because san-cert.pem and san-ca.pem have expired. We
fix that by using the CertificateGenerator to generate temporary certs
during the test run. Since san-cert.pem and san-ca.pem have been
identical, we only generate one certificate.
Closes GH-7763.
2021-12-12 14:26:17 +01:00
Dmitry Stogov
6f42c073cf
Remove range inference for booleans.
...
Range inference for bolleans and longs comparison was incorrect.
Fizes oss-fuzz #fuzz-42161.php
2021-12-10 14:32:47 +03:00
Dmitry Stogov
0ac3d78d7d
Fix incorrect JMP optimization
...
Fixes oss-fuzz #42155
2021-12-10 01:39:28 +03:00
Christoph M. Becker
efb901ebed
Skip bug_36798.phpt for PDO_DBLIB
...
For some reason, this test fails now with "Incorrect syntax near ''.
[SELECT '�' as test FROM test WHERE id = '1']", so we skip it.
2021-12-07 20:24:15 +01:00
Aliaksandr Bystry
daf79e2d91
Fix #75917 : SplFileObject::seek broken with CSV flags
...
Closes GH-7697.
2021-12-06 18:59:48 +01:00
Dmitry Stogov
7b629afe4e
Fixed incorrect DCE of a constructor call
...
Fixez oss-fuzz #42049
2021-12-06 15:59:30 +03:00
Dmitry Stogov
c29f6baaee
JIT: Fix incorrect elimination of type store
...
Fixes oss-fuzz #41995
2021-12-06 14:22:07 +03:00
Dmitry Stogov
aa7280264e
Fix refcount inferemce ($a += $a returns old array with RCN)
...
Fixes oss-fuzz #41670
2021-12-06 11:30:03 +03:00
Dmitry Stogov
c9901aa594
Add missing "return"
2021-12-03 13:52:10 +03:00
Dmitry Stogov
4a5c05a49d
ws
2021-12-03 13:40:01 +03:00
Dmitry Stogov
1d054b3fa7
Fix array object clobbering by user error handler
...
Fixes oss-fuss #41605 and #41610
2021-12-03 13:35:28 +03:00
Dmitry Stogov
2515e788bc
JIT: Fix register clobbering
...
Fixes oss-fuzz #41621
2021-12-03 11:13:50 +03:00
Dmitry Stogov
c4ee66856e
Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure
2021-12-02 23:47:36 +03:00
Dmitry Stogov
2fde308fc6
JIT: Fix ASSIGN_DIM_OP with undefined variable and index and user error handler, throwing an exception
...
Fixes oss-fuzz #39422
2021-12-02 22:19:48 +03:00
Dmitry Stogov
94286cd596
Fix yet another indirect string modification by error handler problem
2021-12-02 16:16:54 +03:00
Dmitry Stogov
37ac707cac
Add missing zend_string_release_ex(tmp, 0) and cleanup
...
- use GC_DELREF() instead of zend_string_release_ex()
- add expectations for exceptional cases
- replace IS_ARRAY_IMMUTABLE by IS_STR_INTERNED
2021-12-02 11:18:08 +03:00
Dmitry Stogov
df16da3697
Fixed ext/bz2/tests/005.phpt test failure introduesed by 09547c64c2
2021-12-02 10:32:45 +03:00
Dmitry Stogov
4595a57e99
Fix clobering of operand by error handler in assignment to string offset (optimization and JIT support)
2021-12-02 01:20:17 +03:00
Dmitry Stogov
e7b31f57ec
JIT: Fix incorrect code produced for BOOL_NOT and [double, undef] operand
...
Fixes oss-fuzz #41531
2021-11-30 20:36:52 +03:00
Dmitry Stogov
c1036194d6
JIT: Fix incorrect reference counting inference
...
Fixes oss-fuzz #40747
2021-11-30 12:58:54 +03:00
Dmitry Stogov
6e1fe96962
JIT: Fix uninitialized result of ASSIGN_DIM[_OP] after clobbering array by user error handler
...
Fixes oss-fuzz #41208
2021-11-30 11:40:18 +03:00
Dmitry Stogov
86430e8e01
Fixed type inference (it's safe to ignore reference counting narrowing)
2021-11-29 23:32:52 +03:00
Dmitry Stogov
aff115547f
JIT: Fix exception handling when next array element is already occupied
...
Fixes oss-fuzz #41408
2021-11-29 21:44:00 +03:00
Christoph M. Becker
816aa20391
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #74604 : Out of bounds in php_pcre_replace_impl
2021-11-29 19:15:20 +01:00