1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00
Commit Graph

1167 Commits

Author SHA1 Message Date
Peter Kokot
bafb17adcf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update year to 2024
2024-01-04 19:29:37 +01:00
Peter Kokot
2575e6b88c Update year to 2024 2024-01-04 19:26:32 +01:00
Ilija Tovilo
80b4c73030 Implement diagnostic ignore macro for Clang
Newer versions of Clang now also complain about -Wscript-prototypes for included
headers.

Closes GH-12467
2023-10-18 17:37:15 +02:00
Filip Zrůst
02b3fb1f6b Remove CPP when invoking dtrace utility
We are experiencing an issue when building PHP with DTrace enabled with
SystemTap (see GH-11847).† The issue is caused by inappropriate use C
preprocessor detected by GNU Autoconf in our “configure” script. C
preprocessor configuration found by AC_PROG_CPP macro is portable only
to run on files with “.c” extension.‡ However, statically-defined tracing
is described by D programs with “.d” extension which causes the issue.
We experience this even on typical Linux distribution with GNU Compiler
Collection (GCC) unless we override the defaults detected by our
“configure” script.

Many major Linux distributions use SystemTap to provide “dtrace”
utility. It relies on both external C preprocessor and external C
compiler. C preprocessor can be customized via CPP environment variable.
Similarly, C compiler can be customized via CC environment variable. It
also allows customization of C compiler flags via CFLAGS environment
variable. We have recently aligned both CPP and CC environment variable
with C preprocessor and C compiler we use to build regular C source code
as provided by our “configure” script (see GH-11643).* We wanted to
allow cross-compilation on Linux for which this was the only blocker. C
compiler flags from CFLAGS_CLEAN macro have already been in place since
versions 5.4.20 and 5.5.4 from 2013-09-18.

We had modified all “dtrace” invocations in the same way to make it look
consistent. However, only the C compiler (CC environment variable) is
necessary to for cross-compilation. There have never been any reported
issue with the C preprocessor. We acknowledge it would be great to allow
C preprocessor customization as well. However, the implementation would
require a lot of effort to do correctly given the limitations of
AC_PROG_CPP macro from GNU Autoconf. This would be further complicated
by the fact that all DTrace implementations, not just SystemTap, allow C
preprocessor customization but Oracle DTrace, Open DTrace, and their
forks do it differently. Nevertheless, they all default to “cpp” utility
and they all have or had been working fine. Therefore, we believe simply
removing CPP stabilizes “dtrace” invocation on Linux systems with
SystemTap and aligns it with other system configurations on other
platforms, until someone comes with complete solution with custom “m4”
and “make” macros, while our build system on Linux with SystemTap
supports cross-compilation.

Fixes GH-11847
Closes GH-12083

† https://github.com/php/php-src/issues/11847https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/autoconf.html#index-AC_005fPROG_005fCPP-1
* https://github.com/php/php-src/issues/11643
2023-08-30 13:40:21 +01:00
Máté Kocsis
c934e24197 Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs 2023-08-26 21:35:31 +02:00
Kamil Tekiela
a53e56176c Remove unnecessary parentheses around language constructs in oci8 2023-07-31 22:52:43 +01:00
Michael Orlitzky
605c60cd5f Skip oci8 tests when no database is available (#11820)
Most oci8 tests fail out-of-the-box because a typical host won't have
an Oracle database instance available. Other database drivers like
mysqli and pgsql address this problem with an include file, inserted
into SKIPIF, that skips the test if no connection at all can be made.

This commits adds such a file (skipifconnectfailure.inc) for oci8, and
adds the corresponding SKIPIF to any tests that connect to a database.

Closes GH-11804

* ext/oci8/tests/lob_aliases.phpt: drop unnecessary SKIPIF.
2023-07-31 15:19:31 +01:00
Filip Zrůst
475fd29527 Improve DTrace probe generation /w non-default compiler
With DTrace support enabled during ./configure, our custom Autoconf
macro PHP_INIT_DTRACE creates make rules to generate header and object
files using dtrace utility. SystemTap† implementation of dtrace relies
on other utilities to provide header preprocessing and final object file
compilation. These utilities are configured by common environment
variables with common defaults:‡

* preprocessor from CPP defaults to “cpp”
* compiler from CC defaults to “gcc”
* compiler arguments can be expanded with CFLAGS

This has been in SystemTap since version 1.5 released on 2011-05-23. We
have been setting CFLAGS for dtrace since 717b367 released in versions
5.4.20 and 5.5.4 on 2013-09-18. This change fixed build against
SystemTap. It fixes majority of cases since practically all free Linux
distributions use SystemTap for DTrace-like dynamic tracing and
practically all of them use GCC or compatible compiler suite. However,
this becomes an issue when cross-compiling using GCC because utility
names contain target triplets. Autoconf already handles
cross-compilation well —setting correct CC and CPP make macros
(variables).

Therefore, we simply set CC and CPP environment variables using
respective macros when executing dtrace. Although SystemTap dtrace does
not always use CC nor CPP, we set it every time. SystemTap documentation
does not talk about this at all¶, so it is safer to always set it. We
also follow how we set CFLAGS every time in the past.

Original (or ported) DTrace mainly used on Oracle Linux, Solaris and
macOS ignores these and does not support cross compilation.§

† Well-known dynamic tracing infrastructure for Linux compatible with
statically-defined tracing from DTrace.
‡ https://sourceware.org/git/?p=systemtap.git;a=blob;f=dtrace.in;h=73a6f22e2de072773c692e3fea05c4b8cf814e43;hb=ebb424eee5599fcc131901c0d82d0bfc0d2f57abhttps://sourceware.org/systemtap/man/dtrace.1.html
§ https://docs.oracle.com/cd/E88353_01/html/E72487/dtrace-8.html

Closes GH-11643
2023-07-19 15:30:50 +02:00
Ilija Tovilo
7b355e8d34 Revert "Merge branch 'PHP-8.2'"
This reverts commit 45a3f178dc, reversing
changes made to b2a54bc6af.
2023-07-04 09:18:49 +02:00
Ilija Tovilo
ef4f08832c Revert "Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs"
This reverts commit d7ab0ff0c8.
2023-07-04 09:11:14 +02:00
Máté Kocsis
45a3f178dc Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs

Closes GH-10170
2023-07-03 11:17:08 +02:00
Máté Kocsis
d7ab0ff0c8 Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs 2023-07-03 08:32:58 +02:00
Christopher Jones
b06a6b82d6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Bump OCI8 version to make a PECL release for 8.2
2023-04-20 18:04:46 +10:00
Christopher Jones
91d3aaaa93 Bump OCI8 version to make a PECL release for 8.2 2023-04-20 18:01:43 +10:00
Ilija Tovilo
50f58c8923 Add ASAN XLEAK support
Only disable LSAN instead of skipping the test. This way we can still detect
memory issues which is arguably more important anyway.

Closes GH-10996
2023-04-03 08:02:19 +02:00
Ilija Tovilo
11fbf3da35 Merge branch 'PHP-8.2'
* PHP-8.2:
  Unparallelize IO heavy tests
2023-03-27 16:34:19 +02:00
Ilija Tovilo
9b15537e9a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Unparallelize IO heavy tests
2023-03-27 16:34:11 +02:00
Ilija Tovilo
e1ec67acd6 Unparallelize IO heavy tests
Alternative to GH-10892. This is somewhat unfortunate since these are also the
slow tests. I'm also not sure if this actually helps.

Closes GH-10953
2023-03-27 16:33:36 +02:00
Ilija Tovilo
d98963a071 Switch to Ubuntu 22.04 for GitHub actions jobs
Closes GH-10814
2023-03-10 00:17:23 +01:00
Peter Kokot
3030d956d9 [skip ci] Update year to 2023 (#10374) 2023-01-19 12:01:29 +01:00
Christoph M. Becker
c8955c078a Revert GH-10220
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491.
This reverts commit 588a07f737.
This reverts commit f377e15751.
This reverts commit b4ba16fe18.
This reverts commit 694ec1deea.
This reverts commit 6b34de8eba.
This reverts commit aa1cd02a43.
This reverts commit 308fd311ea.
This reverts commit 16203b53e1.
This reverts commit 738fb5ca54.
This reverts commit 9fdbefacd3.
This reverts commit cd4a7c1d90.
This reverts commit 928685eba2.
This reverts commit 01e5ffc85c.
2023-01-16 12:27:33 +01:00
Max Kellermann
308fd311ea ext/{standard,json,random,...}: add missing includes 2023-01-10 14:19:03 +00:00
Ilija Tovilo
81bedb0f7d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Skip some OCI tests with repeat
2022-09-27 23:32:37 +02:00
Ilija Tovilo
93e509fd8c Skip some OCI tests with repeat 2022-09-27 23:32:15 +02:00
Christoph M. Becker
5b8f379fb6 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Always skip randomly failing OCI8 extauth tests
2022-09-13 14:26:45 +02:00
Christoph M. Becker
cd927ef634 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Always skip randomly failing OCI8 extauth tests
2022-09-13 14:25:11 +02:00
Michael Voříšek
9a73ec0367 Always skip randomly failing OCI8 extauth tests
This might be caused by an issue with the Oracle Instant Client
libraries[1]; we skip the tests for the time being.

[1] <https://github.com/php/php-src/pull/9524#issuecomment-1244409815>

Closes GH-9524.
2022-09-13 14:21:23 +02:00
Ilija Tovilo
6af3f5d514 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Skip oci tests that leak under asan
  Fix undefined left shift in oci
2022-09-08 15:58:11 +02:00
Ilija Tovilo
f8d62b4c4b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Skip oci tests that leak under asan
  Fix undefined left shift in oci
2022-09-08 15:57:53 +02:00
Ilija Tovilo
4a8cca241f Skip oci tests that leak under asan 2022-09-08 15:56:13 +02:00
Ilija Tovilo
aa7f4497bf Fix undefined left shift in oci
The bit is shifted into the signed bit which is undefined. Make the
integer explicitly unsigned before shifting.
2022-09-08 15:56:10 +02:00
Máté Kocsis
b4ec3e9bc0 Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Christoph M. Becker
b485a3ec0b Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix oci8/pdo_oci random test failures when run in parallel
2022-08-25 15:22:52 +02:00
Christoph M. Becker
502c630d01 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix oci8/pdo_oci random test failures when run in parallel
2022-08-25 15:21:52 +02:00
Michael Voříšek
be4dd60c55 Fix oci8/pdo_oci random test failures when run in parallel
Closes GH-9424.
2022-08-25 15:20:50 +02:00
Máté Kocsis
de90edc42c Declare ext/oci8 constants in stubs (#9419)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-08-24 21:10:20 +02:00
Michael Voříšek
fc42098c23 Fix typo in lob_prefetch_ini.phpt test (#9099) 2022-07-22 17:17:03 +01:00
Ilija Tovilo
41a5b46e7d Fix RC debug of stub attribute (#9082) 2022-07-21 15:06:04 +02:00
Remi Collet
55a88f36b6 add SensitiveParameter as known string and use it in arginfo 2022-07-18 11:43:33 +02:00
Tim Düsterhus
342e18f105 Support the actual #[\SensitiveParameter] attribute in stubs (#8836) 2022-07-12 12:43:44 +02:00
Bob Weinand
9f29e2d7e9 Allow for arbitrary (class) attributes in stubs
This can be easily extended to other types of attributes.

Closes #8839.
2022-07-05 18:23:05 +02:00
Pierrick Charron
6b6e5f3748 Add AllowDynamicProperties on OCILob and OCICollection
Fix GH-8756 : oci_new_descriptor() triggers dynamic property
deprecation.

This fix should be temporary. At some point we should either define
those properties or just hide them since they should probably not be
used.

Better fix is here : https://github.com/php/php-src/pull/8758 but
waiting feedback from Oracle team before going ahead.
2022-06-22 06:40:41 -04:00
Yurun
5cf2659fa5 Replace the use of ZVAL_BOOL() with ZVAL_TRUE() or ZVAL_FALSE() where the value is fixed (#8815) 2022-06-20 13:34:44 +01:00
Pierrick Charron
6fd2b39397 Indent with TAB in .h files generated by gen_stub 2022-06-13 08:55:54 -04:00
Tim Düsterhus
ac6dbbd183 Mark parameter in ext/oci8 as sensitive 2022-06-13 11:09:12 +02:00
Ilija Tovilo
9a90bd7054 Deprecate ${} string interpolation
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-05-05 10:14:56 +02:00
Max Kellermann
b9e895bca0 Replace memcmp() with zend_string functions (#8216)
* ext/oci8: use zend_string_equals()

Eliminate duplicate code.

* main/php_variables: use zend_string_equals_literal()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_equals_cstr()

Allows eliminating duplicate code.

* Zend, ext/{opcache,standard}, main/output: use zend_string_equals_cstr()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_starts_with()

* ext/{opcache,phar,spl,standard}: use zend_string_starts_with()

This adds missing length checks to several callers, e.g. in
cache_script_in_shared_memory().  This is important when the
zend_string is shorter than the string parameter, when memcmp()
happens to check backwards; this can result in an out-of-bounds memory
access.
2022-03-31 16:27:58 +02:00
istiak101
bf2867bc72 Fix FSF address & update year to 2022
FSF mailing address was changed long time ago. This patch updates that address. Also updated year from 2021 to 2022.

Closes GH-8009.
2022-03-19 18:25:29 +01:00
Christoph M. Becker
30a3280df7 Oracle Client 10g is no longer supported
Thus, we drop respective config option for Windows.
2021-12-15 22:09:58 +01:00
Christoph M. Becker
1d54097435 Fix oci8 Oracle Client paths on Windows
This is a copy & paste relict, but we don't fix it for the stable
branches, since some may rely on these paths now (unlikely, but still
possible).
2021-12-12 22:45:46 +01:00