Commit Graph

655 Commits

Author SHA1 Message Date
Peter Kokot
907b07822c Merge branch 'PHP-8.3'
* PHP-8.3:
  Add cross-compiling 3rd argument to AC_RUN_IFELSE
2023-12-22 16:35:40 +01:00
Peter Kokot
71e002b38e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add cross-compiling 3rd argument to AC_RUN_IFELSE
2023-12-22 16:34:42 +01:00
Peter Kokot
de5557b02f Add cross-compiling 3rd argument to AC_RUN_IFELSE
Autotools emits warning if 3rd argument is empty. Call is wrapped in the
AC_CACHE_CHECK with php_cv_* cache variable name according to the docs.

Closes GH-12966
2023-12-22 16:24:40 +01:00
Cristian Rodríguez
927adfb1a6
Use a single version of mempcpy(3) (#12257)
While __php_mempcpy is only used by ext/standard/crypt_sha*, the
mempcpy "pattern" is used everywhere.

This commit removes __php_mempcpy, adds zend_mempcpy and transforms
open-coded parts into function calls.
2023-12-20 15:16:32 +00:00
Thomas Hurst
b90c9ca7db Enable ifunc checks on FreeBSD 12+
This was disabled in 2019 due to problems reported in FreeBSD 11. The original
report (PHP bug 77284) includes a comment that FreeBSD 12 worked - which also
happens to be the first version ifunc use appeared in libc.

Close GH-12288
2023-12-11 09:07:28 +00:00
David CARLIER
09838f17cb
zend_call_stack support proposal for solaris/illumos. (#12862) 2023-12-09 14:19:07 +00:00
Pierrick Charron
dc3641ea0f
PHP-8.2 is now for PHP 8.2.15-dev 2023-12-05 15:01:08 -05:00
Eric Mann
1fdf21fe84
PHP-8.3 is now for PHP 8.3.2-dev 2023-12-05 07:56:55 -08:00
Peter Kokot
40d1442cec
Remove unused gcov artifacts (#12786) 2023-11-27 02:07:05 +00:00
Peter Kokot
3665e90061
Remove unused PHP_COMPILE and CXX_PHP_COMPILE variables (#12760)
These were part of the old build system and are no longer used.
2023-11-24 01:35:24 +00:00
Peter Kokot
5140889c92
Remove unused build variables (#12746)
- LFLAGS
- PHP_LIBS
- SHARED_LIBTOOL
- EXT_LIBS

These were part of the build system in the past and are no longer used
in current code.
2023-11-22 19:15:30 +01:00
Jakub Zelenka
178d3acf4c
PHP 8.3 is now 8.3.1-dev 2023-11-21 14:54:52 +00:00
Peter Kokot
7d52f39954
Remove redundant PHP_SUBST_OLD(INCLUDE_PATH) (#12738)
The AC_SUBST(INCLUDE_PATH) is enough to only replace the variable in the
build-defs.h.in file.
2023-11-21 02:56:36 +00:00
Peter Kokot
77ea5c5691
Remove obsolescent AC_TYPE_SIZE_T (#12719)
The macro checks for existence of size_t in <stddef.h> otherwise it sets
it to 'unsigned int'. The size_t is part of C89 standard and all
platforms should have it. Macro is also marked to be made obsolete in
the future versions of Autoconf.

At this point there is still AC_FUNC_ALLOCA in PHP's configure.ac which
uses AC_TYPE_SIZE_T under the hood so the check is still done there in
the meantime.
2023-11-19 06:57:22 +00:00
Peter Kokot
a35a69ff0f
Clean duplicate headers check (#12710)
- AC_CHECK_HEADERS already includes the header(s) listed in the first
  argument, so additional net/if.h is redundant.
- The crypt.h is checked two times and HAVE_CRYPT_H is only needed in
  ext/standard.
- Remove duplicate <string.h> in ext/standard
- Remove duplicate <string.h> in getaddrinfo check in configure.ac
2023-11-18 04:20:36 +00:00
Peter Kokot
a6d5f3461b
Remove obsolete DG/UX check (#12713)
DG/UX is a discontinued Unix OS, the support for which ended in 2001.
2023-11-18 04:18:26 +00:00
David CARLIER
931a8b0739
inet_ntop requirement check at configure time instead (#12700) 2023-11-17 16:01:46 +00:00
Ilija Tovilo
a785b2fac0
Merge branch 'PHP-8.3'
* PHP-8.3:
  Disable -fsanitize=function on Clang 17
2023-11-11 21:11:08 +01:00
Ilija Tovilo
d5a25d51fc
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disable -fsanitize=function on Clang 17
2023-11-11 21:11:02 +01:00
Ilija Tovilo
ca22505c8c
Disable -fsanitize=function on Clang 17
Closes GH-12642
2023-11-11 21:09:45 +01:00
Sergey Panteleev
239a26fa90
PHP-8.2 is now for PHP 8.2.14-dev 2023-11-07 17:12:19 +03:00
David Carlier
44f9c226aa following-up on GH-12551: removing inet_ntoa usage
Close GH-12554
2023-11-06 12:05:56 +00:00
Peter Kokot
7d485aa628
ext/sockets: Clean header checks (#12607)
- Unused header checks removed:
  HAVE_NETINET_TCP_H and HAVE_SYS_UN_H are not used in the code.
- Duplicate linux/filter.h check removed:
  HAVE_LINUX_FILTER_H is already defined in ext/sockets.
2023-11-04 15:12:16 +00:00
Ilija Tovilo
2efe366af6
Add zend_worklist.h to PHP_INSTALL_HEADERS (#12571)
Fixes GH-12565
2023-10-30 19:37:27 +01:00
Pierrick Charron
2642a08697
PHP-8.2 is now for PHP 8.2.13-dev 2023-10-10 11:45:26 -04:00
Ilija Tovilo
62e2402534
Use autoconf for recognizing __builtin_unreachable() (#12266)
Older versions of GCC don't support __has_builtin(), but do support
__builtin_unreachable().
2023-09-22 11:53:09 +02:00
Sergey Panteleev
5c1f746716
PHP-8.2 is now for PHP 8.2.12-dev 2023-09-12 14:53:56 +03:00
Jakub Zelenka
7deb84b7a6
Start PHP 8.4 development cycle 2023-08-29 17:19:01 +01:00
Peter Kokot
1413787884 Merge branch 'PHP-8.2'
* PHP-8.2:
  On riscv64 require libatomic if actually needed
2023-08-28 19:48:49 +02:00
Peter Kokot
a1043fe051 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  On riscv64 require libatomic if actually needed
2023-08-28 19:47:44 +02:00
Jeremie Courreges-Anglas
bf3fb4e5c9 On riscv64 require libatomic if actually needed
clang and newer gcc releases support byte-sized atomic accesses on
riscv64 through inline builtins.  In both cases the hard dependency on
libatomic added by GH-11321 isn't useful.

Stop using AC_CHECK_LIB() which is too naive to notice that libatomic
isn't needed.  Instead, PHP_CHECK_FUNC() will retry the check with -latomic
if required.

Closes GH-11790
2023-08-28 19:47:19 +02:00
Pierrick Charron
4467f33e89
PHP-8.2 is now for PHP 8.2.11-dev 2023-08-15 16:08:52 -04:00
Patrick Allaert
6e3f93f2f8
PHP-8.1 is now for PHP 8.1.24-dev 2023-08-15 21:09:58 +02:00
David CARLIER
3e315df6f8 Merge branch 'PHP-8.2' 2023-08-07 19:02:55 +01:00
David CARLIER
e9e5b4c1c8 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-07 19:02:44 +01:00
Kévin Dunglas
96885bc04f fix: handle the GNU specific version of strerror_r
Close GH-11882
2023-08-07 19:01:24 +01:00
Peter Kokot
37d35f5ed8
Move --enable/--disable-fiber-asm help output (#11827)
This moves the fiber configure option in the Zend section. TSRM doesn't
currently have any specific configure options so it can be removed from
the ./configure --help output.
2023-07-31 15:29:14 +01:00
Peter Kokot
b132b7ab7e
Remove check for time.h and HAVE_TIME_H (#11726)
The `<time.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

The conditional include based on Windows is there so the win32/time.h
can be included on other places when needed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2023-07-20 09:38:53 +02:00
Athos Ribeiro
d35df89c35 Fix #79026: Allow PHP_EXTRA_VERSION overrides
When building from sources, someone distributing PHP may want to add a
vendor specific string to the PHP_VERSION so users can differentiate
multiple vendor builds from the same PHP version. For instance, a vendor
backporting a bug fix to a no-longer-supported PHP version could extend
their PHP_EXTRA_VERSION to allow their users to identify that they carry
such fix by checking their PHP_VERSION.

Closes GH-11706
2023-07-19 12:14:42 +02:00
Ben Ramsey
6e3c520f51
PHP-8.1 is now for PHP-8.1.23-dev 2023-07-18 16:30:49 -05:00
Sergey Panteleev
796a75f967
PHP-8.2 is now for PHP 8.2.10-dev 2023-07-18 14:02:43 +03:00
Arnaud Le Blanc
d0731934b7
Expose time spent collecting cycles in gc_status() (#11523) 2023-07-16 12:34:28 +02:00
Ben Ramsey
097b08cbbe
Merge branch 'PHP-8.1' into PHP-8.2 2023-07-10 09:26:17 -05:00
Peter Kokot
41a3573fcc
Fix GH-9483: Autoconf warnings for newer Autoconf versions
Co-authored-by: Levi Morrison <morrison.levi@gmail.com>
2023-07-10 09:25:58 -05:00
Peter Kokot
cf587c1a1b
Fix GH-11603: Set LDFLAGS (#11605)
The two unsets before the last `unset LIBS LDFLAGS` are not necessary so
LDFLAGS can be adjusted via command line:

LDFLAGS="..." ./configure

Co-authored-by: Max Kellermann <max.kellermann@ionos.com>
2023-07-07 03:30:56 +01:00
Sergey Panteleev
884a53f39a
PHP-8.2 is now for PHP 8.2.9-dev 2023-06-20 17:25:30 +03:00
Patrick Allaert
6c4b1e0417
PHP-8.1 is now for PHP 8.1.22-dev 2023-06-20 16:07:05 +02:00
David Carlier
2e4369a171 Merge branch 'PHP-8.2' 2023-05-27 16:38:46 +01:00
David Carlier
350e449bd8 Merge branch 'PHP-8.1' into PHP-8.2 2023-05-27 16:37:48 +01:00
Daniil Gentili
1dfa277a96 Fix GCC 12 compilation on riscv64
Close GH-11321
2023-05-27 16:37:19 +01:00
Ben Ramsey
2f2fd06be0
PHP-8.1 is now for PHP 8.1.21-dev 2023-05-23 16:19:16 -05:00
Pierrick Charron
d5f68b50fc
PHP-8.2 is now for PHP 8.2.8-dev 2023-05-23 16:56:58 -04:00
Sergey Panteleev
8318f4a6b1
PHP-8.2 is now for PHP 8.2.7-dev 2023-04-25 18:33:13 +03:00
Patrick Allaert
725f136f9a
PHP-8.1 is now for PHP 8.1.20-dev 2023-04-25 16:18:30 +02:00
Dmitry Stogov
c9d728cbd6 Revert "Zend/zend_types.h: move zend_rc_debug to zend_rc_debug.h"
This reverts commit d6e95041e2.
2023-04-04 22:48:26 +03:00
Ben Ramsey
d9df750b22
PHP-8.1 is now for PHP 8.1.19-dev 2023-03-29 19:51:20 -05:00
Pierrick Charron
f7c692a940
PHP-8.2 is now for PHP 8.2.6-dev 2023-03-28 17:27:17 -04:00
Ilija Tovilo
5eb6905405
Disable --with-valgrind by default (#10934)
Same reasoning as GH-10876
2023-03-25 18:10:14 +01:00
Arnaud Le Blanc
0c7fc351ea Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:56:34 +01:00
Arnaud Le Blanc
37030257b8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:45:50 +01:00
Kévin Dunglas
ad85e71421
fix: support for timeouts with ZTS on Linux (#10141) 2023-03-03 11:35:06 +01:00
Patrick Allaert
729f006de8
PHP-8.1 is now for PHP 8.1.18-dev 2023-02-28 21:37:52 +01:00
Sergey Panteleev
23ce3423c1
PHP-8.2 is now for PHP 8.2.5-dev 2023-02-28 18:15:20 +03:00
Max Kellermann
d6e95041e2 Zend/zend_types.h: move zend_rc_debug to zend_rc_debug.h
`zend_rc_debug` is not a type and does not really belong in
`zend_types.h`; this allows using `ZEND_RC_MOD_CHECK()` without
including the huge `zend_types.h` header and allows decoupling
circular header dependencies.
2023-02-26 14:16:53 +00:00
Ben Ramsey
586e81b259
Point to the issue tracker on GitHub 2023-02-14 13:49:02 -06:00
Pierrick Charron
dc054488da
PHP-8.2 is now for PHP 8.2.4-dev 2023-02-14 10:02:46 -05:00
Ben Ramsey
28d68f5013
PHP-8.1 is now for PHP 8.1.17-dev 2023-02-13 13:16:07 -06:00
Frank Du
a9437ceb6f
base64: add avx512 and vbmi version. (#6361)
1. Implementation based on https://github.com/WojciechMula/base64simd
2. Only runtime path is added to reduce the complexity of SIMD variants.
3. Expand test case to cover SIMD implementation.

Signed-off-by: Frank Du <frank.du@intel.com>
2023-02-13 03:30:47 +00:00
Derick Rethans
df853cb305 Bump minimum re2c version requirement to 1.0.3
The release VMs already enforced this, but PHP's configure script did
not.

re2c 0.13.5, which timelib's date/time parser requires is no longer
compatible with the current version of Zend/zend_language_scanner.l, as
it starts spinning in a loop.
2023-02-09 10:59:58 +00:00
Alex Dowad
c8ec2ed730 Add AVX2-accelerated UTF-16 decoding/encoding routines
As with other SIMD-accelerated functions in php-src, the new UTF-16
encoding and decoding routines can be compiled either with AVX2
acceleration "always on", "always off", or else with runtime detection
of AVX2 support.

With the new UTF-16 decoder/encoder, conversion of extremely short
strings (as in several bytes) has the same performance as before,
and conversion of medium-length (~100 character) strings is about 65%
faster, but conversion of long (~10,000 character) strings is around
6 times faster.

Many other mbstring functions will also be faster now when handling
UTF-16; for example, mb_strlen is almost 3 times faster on medium
strings, and almost 9 times faster on long strings. (Why does mb_strlen
benefit more from AVX2 acceleration than mb_convert_encoding? It's
because mb_strlen only needs to decode, but not re-encode, the input
string, and the UTF-16 decoder benefits much more from SIMD
acceleration than the UTF-16 encoder.)
2023-02-05 20:06:42 +02:00
Peter Kokot
bf5fdbd3a8
AC_PROG_CC_C99 is obsolete with autoconf >= 2.70 (#10383)
To make sure that compiler supports C99 before Autoconf 2.69, this was
needed. But with Autoconf 2.70 and later the macro is obsolete because
the checks are done in AC_PROG_CC and warnings are emitted when building
configure script.

Fixes part of GH-9483
2023-01-23 13:39:41 +00:00
Sergey Panteleev
eee988e86d
PHP-8.2 is now for PHP 8.2.3-dev 2023-01-17 20:55:22 +03:00
Patrick Allaert
c47a1a260d
PHP-8.1 is now for PHP 8.1.16-dev 2023-01-17 17:24:25 +01:00
Arnaud Le Blanc
a11c8a3039
Limit stack size (#9104) 2022-12-16 17:44:26 +01:00
Pierrick Charron
002d54db9f
PHP-8.2 is now for PHP 8.2.2-dev 2022-12-13 19:29:29 -05:00
Ben Ramsey
696bb385df
PHP-8.1 is now for PHP 8.1.15-dev 2022-12-07 11:29:37 -06:00
David CARLIER
3660bc31de opcache fixing w/x pages creation on freebsd 13.1 and above.
By default, the system allows these but admin can disable them system wide.
However the procctl api permits to control it per process.

Closes GH-9896.
2022-11-18 19:22:00 +00:00
Dmitry Stogov
05f4b84940 Fix cross-compilation for shadow_stack_exists 2022-11-17 15:39:43 +03:00
Pierrick Charron
44d652c00a
PHP-8.2 is now for PHP 8.2.1-dev and prepare NEWS for 8.2.0 2022-11-08 13:26:35 -05:00
Patrick Allaert
540488c74e
PHP-8.1 is now for PHP 8.1.14-dev 2022-11-08 17:57:34 +01:00
Bob Weinand
b3f3414ce9 Merge branch 'PHP-8.2' 2022-11-07 16:43:24 +01:00
Bob Weinand
5d7b64be1d Fix cross-compilation for copy_file_range 2022-11-07 16:39:08 +01:00
Chen, Hu
37b84b7e32
Fiber: add shadow stack support
Shadow stack is part of Intel's Control-Flow Enforcement Technology (CET).

Whenever a function is called, the return address is pushed onto both
the regular stack and the shadow stack. When that function returns, the
return addresses are popped off both stacks and compared; if they fail
to match, #CP raised.

With this commit, we create shadow stack for each fiber context and
switch the shadow stack accordingly during fcontext switch.

Signed-off-by: Chen, Hu <hu1.chen@intel.com>

Closes GH-9283.
2022-11-07 14:48:27 +01:00
Jakub Zelenka
b8d013a48d
Merge branch 'PHP-8.2' 2022-10-23 12:41:51 +01:00
Jakub Zelenka
b732d80329
Fix bug GH-9779: stream_copy_to_stream fail when dest in append mode 2022-10-23 12:40:22 +01:00
Ben Ramsey
865161af33
PHP-8.1 is now for PHP 8.1.13-dev 2022-10-11 19:47:00 -04:00
David Carlier
f9f9e7f053 Merge branch 'PHP-8.2' 2022-10-11 21:48:46 +01:00
David Carlier
c15fe51918 Fix GH-9653: does not inconditionally support copy_file_range on older kernels.
As mentioned in its manpage, it had been reworked in the 5.3 line to support cross filesystem interactions.
Closes #GH-9656
2022-10-11 21:47:34 +01:00
David Carlier
43f5165e89 Fix GH-9566: disable assembly for Fiber on FreeBSD i386.
preparing in case there is more architectures especially the not tested.
2022-10-10 12:32:49 +01:00
David Carlier
8e146c8806 Merge branch 'PHP-8.1' into PHP-8.2 2022-10-10 12:31:57 +01:00
David Carlier
be53e5e5bb Fix GH-9566: disable assembly for Fiber on FreeBSD i386.
preparing in case there is more architectures especially the not tested.
2022-10-10 12:31:38 +01:00
Ilija Tovilo
138fd5b3c8
Replace reallocarray with safe_perealloc
Fixes GH-9581
2022-09-29 15:15:40 +02:00
Ilija Tovilo
b61c81c949
Replace reallocarray with safe_perealloc (#9593) 2022-09-22 14:55:41 +02:00
Patrick Allaert
0f575aa698
PHP-8.1 is now for PHP 8.1.12-dev 2022-09-13 23:09:47 +02:00
Ilija Tovilo
ecc3fc180f
Use PDEATHSIG to kill cli-server workers if parent exists
Closes GH-9476
2022-09-08 10:48:20 +02:00
Dominic H
cb4e8ff2b8
[ci skip] Fix typo in configure.ac (build → built)
Closes GH-9495.
2022-09-07 17:17:58 +02:00
Pierrick Charron
327c95237c
Prepare for PHP 8.3 2022-08-30 11:17:15 -04:00
Ben Ramsey
7f26661993
PHP-8.1 is now for PHP 8.1.11-dev 2022-08-16 10:45:29 -05:00
David CARLIER
099b16800c GH-9157: opcache fix build on older macOs releases.
Closes #9158.
2022-07-27 09:37:54 +01:00
Patrick Allaert
9af3327176
PHP-8.1 is now for PHP 8.1.10-dev 2022-07-20 06:48:52 +02:00
David CARLIER
1416961505 opcache JIT support improvements attempts on macOs.
for cases when shared segments switch b/w R/W/X and R/X bits.

Closes #8382.
2022-07-19 13:41:33 +01:00
David CARLIER
bf29ee6917 Add reallocarray implementation.
In a similar model as _safe_*alloc api but for the `userland` it guards
against overflow before (re)allocation, usage concealed in fpm for now.
Modern Linux and most of BSD already have it.
Closes #8871.
2022-06-26 13:10:13 +01:00
Ben Ramsey
f3b45e74f5
PHP-8.1 is now for PHP 8.1.9-dev 2022-06-21 11:03:50 -05:00
David Carlier
bfe6f9e66a Introduction of timing attack safe bcmp implementation.
Nothing new but to refactor usage b/w hash and password
extensions but using volatile pointers to be a bit safer,
allowing to expand its usage eventually.
2022-06-20 16:30:30 +01:00
David Carlier
d677cc13ce Add SO_BPF_EXTENSIONS flag to socket.
Returns the supported bpf extensions from the kernel. Linux only.
Closes GH-8713.
2022-06-08 05:14:57 +01:00
Levi Morrison
280fd680c8
Make vm_interrupt and timed_out atomic (#8327)
This is done by adding a new zend_atomic_bool type. The type
definition is only available for compiler alignment and size info; it
should be treated as opaque and only the zend_atomic_bool_* family of
functions should be used.

Note that directly using atomic_bool is complicated. All C++ compilers
stdlibs that I checked typedef atomic_bool to std::atomic<bool>, which
can't be used in an extern "C" section, and there's at least one usage
of this in core, and probably more outside of it.

So, instead use platform specific functions, preferring compiler
intrinsics.
2022-06-01 09:43:25 -06:00
David Carlier
30c8f3a80f
Fix GH-8674: sockets extension won't build for older Linux kernels
In abscence of the needed header, disable the feature altogether.

Closes GH-8677.
2022-06-01 17:33:36 +02:00
Calvin Buckley
2920a26636
Quote when adding to connection string in (PDO_)ODBC
Because the UID= and PWD= values are appended to the SQLDriverConnect
case when credentials are passed, we have to append them to the string
in case users are relying on this behaviour. However, they must be
quoted, or the arguments will be invalid (or possibly more injected).
This means users had to quote arguments or append credentials to the raw
connection string themselves.

It seems that ODBC quoting rules are consistent enough (and that
Microsoft trusts them enough to encode into the .NET BCL) that we can
actually check if the string is already quoted (in case a user is
already quoting because of this not being fixed), and if not, apply the
appropriate ODBC quoting rules.

This is because the code exists in main/, and are shared between
both ODBC extensions, so it doesn't make sense for it to only exist
in one or the other. There may be a better spot for it.

Closes GH-8307.
2022-05-27 16:56:44 +02:00
George Peter Banyard
8685a7f03c
Remove custom alloca() (#8513)
* Use arena in DCE instead of multiple alloca()
  This requires passing the optimizer context

* Use our do_alloca() instead of alloca()

* Use emalloc in DEBUG builds instead of stack allocations for do_alloca()
  This helps detecting that we correctly free do_alloca()
2022-05-27 09:05:33 +01:00
Patrick Allaert
3b6ee1eb19
Bump for 8.1.8-dev 2022-05-25 00:54:00 +02:00
Christoph M. Becker
81d1a1b47b
Update bug tracker links
The new php-src bugtracker is on Github.

Closes GH-8277.
2022-05-12 14:55:11 +02:00
Ben Ramsey
fb819faa4e
Prepare for PHP 8.1.7 2022-04-26 19:22:15 -05:00
Max Kellermann
fa6d97db5d
main/streams/streams: use copy_file_range() on Linux (#8413)
copy_file_range() is a Linux-specific system call which allows
efficient copying between two file descriptors, eliminating the need
to transfer data from the kernel to userspace and back.  For
networking file systems like NFS and Ceph, it even eliminates copying
data to the client, and local filesystems like Btrfs and XFS can
create shared extents.
2022-04-23 13:32:05 +01:00
Max Kellermann
d87ba95acd
sapi/*: move duplicate "--define" code to library 2022-04-18 16:52:08 +02:00
Patrick Allaert
5a899563cc
Bump for 8.1.6-dev 2022-03-31 17:37:41 +02:00
Christoph M. Becker
6b2187bc79
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8160: ZTS support on Alpine is broken
2022-03-11 14:42:49 +01:00
Christoph M. Becker
0b1bca6b9c
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8160: ZTS support on Alpine is broken
2022-03-11 14:41:46 +01:00
Michael Voříšek
2b2aeb989e
Fix GH-8160: ZTS support on Alpine is broken
We need to export `__MUSL__` so that phpize builds can see the proper
macro, and also need to fix "_tsrm_ls_cache" usage for musl.

Closes GH-8180.
2022-03-11 14:39:39 +01:00
Patrick Allaert
723058c3bf
Bump for 8.1.5-dev 2022-03-02 17:38:22 +01:00
Patrick Allaert
8db7fd8a2a
Bump for 8.1.4-dev 2022-02-03 02:21:29 +01:00
Sara Golemon
8a46311dbd
Bump for 8.0.17-dev 2022-02-02 23:44:02 +00:00
Patrick Allaert
4ae75623fd
Preparing for 8.1.3-dev 2022-01-04 19:29:41 +01:00
Christoph M. Becker
f2fa8753fa
Merge branch 'PHP-8.1'
* PHP-8.1:
  riscv64 support for fibers
2022-01-04 12:08:38 +01:00
Jeremie Courreges-Anglas
70b02d75f2
riscv64 support for fibers
We add riscv64 assembly files from Boost, needed for fibers support,
and hook up riscv64 fibers support during configure.

Closes GH-7879.
2022-01-04 12:06:37 +01:00
David CARLIER
1a4d2dd962
zend alloc USE_ZEND_ALLOC_HUGE_PAGES option support on solaris based systems (#7789) 2021-12-21 07:18:11 +01:00
Patrick Allaert
628670c391
Prepare for 8.1.2 2021-12-02 14:20:36 +01:00
Sara Golemon
999c6f2c5d
Bump for 8.0.15 2021-12-02 05:09:07 +00:00
Patrick Allaert
ac96db6767
Preparing for 8.1.1 2021-11-27 11:06:14 +01:00
Dmitry Stogov
067df26344 Use memrchr() when available
On x86_64 glibc memrchr() uses SSE/AVX CPU extensions and works much
faster then naive loop. On x86 32-bit we still use inlined version.

memrchr() is a GNU extension. Its prototype  becomes available when
<string.h> is included with defined _GNU_SOURCE macro. Previously, we
defined it in "php_config.h", but some sources may include <string.h>
befire it. To avod mess we also pass -D_GNU_SOURCE to C compiler.
2021-11-24 16:13:34 +03:00
Ben Ramsey
89f28fafca
The PHP-8.1 branch is now for 8.1.0 2021-11-09 17:49:14 -06:00
Sara Golemon
2d4bfcfd3b
Prep for 8.0.14 2021-11-02 15:55:12 +00:00
Patrick Allaert
5dc2c38faf
Configuring for 8.1.0RC6 2021-10-27 02:15:21 +02:00
Ben Ramsey
daf6a46177
The PHP-8.1 branch is now for 8.1.0RC5 2021-10-12 18:50:51 -05:00
Nikita Popov
fe9abf52fa Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bug #75941: Fix compile failure on Solaris with clang
2021-09-29 11:46:23 +02:00
Jaromir Dolecek
26d28c3b42 Fix bug #75941: Fix compile failure on Solaris with clang
Closes GH-7525.
2021-09-29 11:44:47 +02:00
Ben Ramsey
68ee1b40fc
The PHP-8.1 branch is now for 8.1.0RC4 2021-09-28 16:34:46 -05:00
Nikita Popov
74033b2cc6 Don't hardcode used sanitizers in fuzzer
Now that we have generic --enable-address|undefined|memory-sanitizer
options, let the user pick one of these instead of making the fuzzer
enable one implicitly.
2021-09-15 16:07:26 +02:00
Patrick Allaert
cba708bbb6
Configuring for 8.1.0RC3 2021-09-14 18:17:42 +02:00
Sara Golemon
5e1e4a8963
Prep for 8.0.12 2021-09-07 15:16:11 +00:00
Patrick Allaert
d6d6491153
Preparing for 8.1.0RC2 2021-09-01 18:22:32 +02:00
Nikita Popov
27901e0f6a Restore dev version 2021-09-01 09:56:54 +02:00
Patrick Allaert
1c33ddb5e5
Prepare for PHP 8.2 2021-08-31 19:13:49 +02:00
Patrick Allaert
5764414eb8
Prepare for PHP 8.1.0RC1 2021-08-31 18:57:44 +02:00
Calvin Buckley
ea604f0917
AIX/XCOFF support for fibers (#7338) 2021-08-16 17:05:58 -05:00
Joe Watkins
00c668a15d
Drop TsHashTable (#7351) 2021-08-08 10:45:44 +02:00
Sara Golemon
7dc35ac8a7
Bump to 8.0.10 2021-07-13 14:10:35 +00:00
Aaron Piotrowski
8fd747a2a0
Fiber ucontext support (#7226)
Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
2021-07-11 15:40:11 -05:00
Joe Watkins
39a54e2c31
Fix #81202 powerpc64 build fails on fibers 2021-06-26 15:39:39 +02:00
Gabriel Caruso
b81c3b5b1c
Prepare for PHP 8.0.9 2021-06-15 09:19:13 +02:00
Joe Watkins
a297c66cfb
Fix #81136 opcache header not installed, causing shared build to fail 2021-06-14 11:09:36 +02:00
Anatol Belski
b9f3f35d4a
libtool: Add CC tag explicitly
This fixes the scan-build build. CC is also the default tag, so there
should be no impact anywhere.

Signed-off-by: Anatol Belski <ab@php.net>
2021-05-26 22:41:50 +02:00
Derick Rethans
b624473b3e Merge branch 'PHP-8.0' 2021-05-21 09:03:31 +01:00
Derick Rethans
804420b011 Detect musl libc to not set tls_model attribute on that platform
This fixes:
``_tsrm_ls_cache: initial-exec TLS resolves to dynamic definition``
in shared extensions.
2021-05-21 09:02:46 +01:00
Sara Golemon
64918fee97
Prep for 8.0.8 2021-05-19 19:18:56 +00:00
Sara Golemon
f020d537b0
Reset for 8.0.7 2021-05-04 17:17:20 +00:00
Aaron Piotrowski
f3465e6740
Minor fiber fixes
Assert error is fatal when calling zend_error_suspend_fiber.

Added missing static.

Removed .S extension from output of configure.
2021-04-30 10:08:01 -05:00
Nikita Popov
39e1af662b Fix out-of-tree build
Add Zend/asm as a build directory.
2021-04-29 10:13:47 +02:00
Aaron Piotrowski
c276c16b66
Implement Fibers
RFC: https://wiki.php.net/rfc/fibers

Closes GH-6875.
2021-04-26 11:07:06 -05:00
David CARLIER
7aba6de1d0
stream: Fix MacOS build. fsync as alias for fdatasync. (#6882)
If fdatasync is not available, use fsync instead.

For some reason, fdatasync is available when using clang from Xcode, even though no declaration is present in headers.
2021-04-21 16:21:43 +02:00
Dmitry Stogov
f1ad9199ef Better support for cross-compilation 2021-04-16 17:28:54 +03:00
twosee
122deea506
Add ASan and UBSan options (#6825)
When we need to enable ASan/UBSan in PHP extension, we also need to enable it in PHP kernel. Providing these options makes it easier for us to enable ASan/UBSan when compiling PHP.
And we use --enable-address-sanitizer and --enable-undefined-sanitizer in azure-pipelines.yml instead of changing CFLAGS manually.
We also add compile flag check to MSan.
2021-04-16 12:41:25 +08:00
Gabriel Caruso
79872ac9c2
8.0.6 is the next version 2021-04-13 12:41:21 +02:00
Nikita Popov
d58cab06c6 Merge branch 'PHP-8.0'
* PHP-8.0:
  Disable ifunc support on openbsd
2021-04-12 11:28:29 +02:00
Nikita Popov
6700198d64 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Disable ifunc support on openbsd
2021-04-12 11:28:24 +02:00
David Carlier
a04fac84e7 Disable ifunc support on openbsd
Enabling it leads to segfault when resolvers are used e.g.
php_stripslashes.

Closes GH-6851.
2021-04-12 11:27:50 +02:00
Ilija Tovilo
269c8dac1d
Implement enums
RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.
2021-03-17 19:08:03 +01:00
Christoph M. Becker
c7fadd2328 8.0.5 is next
We also move the NEWS entry for bug 80847 to the proper version.
2021-03-17 12:14:26 +01:00
Nikita Popov
fa9e2b31b8 Check for php program in autoconf
Use the detected PHP (minimum 7.1) to run gen_stubs, and other
code generation scripts in the future.
2021-03-16 12:30:56 +01:00
Derick Rethans
4adc08a403 Fix build version too 2021-03-16 09:41:21 +00:00
Sara Golemon
8c6db654e7
Prep for 8.0.4 2021-02-17 15:24:43 +00:00
Derick Rethans
6d3d9104e6 PHP-7.4 is now 7.4.17-dev 2021-02-16 11:26:47 +00:00
Nikita Popov
83be073abe Move optimizer into core
This only moves the files, adjusts the build system, exports APIs
and does minor fixups to make sure the code builds.

This does not yet try to make the optimizer usable independently
of opcache.

Closes GH-6642.
2021-01-28 10:38:25 +01:00
Gabriel Caruso
34f0f60db5
Next is 8.0.3 2021-01-19 13:00:48 -03:00
Derick Rethans
a33d0c3aae Update NEWS and version 2021-01-19 14:58:38 +00:00
Christoph M. Becker
91eb9a1383 Merge branch 'PHP-8.0'
* PHP-8.0:
  Revert fix for bug 76813 and re2c version bump
2021-01-11 17:21:42 +01:00
Christoph M. Becker
95a13ca989 Revert fix for bug 76813 and re2c version bump
CentOS 7 ships with re2c 0.13.5 by default, so we should not have
bumped the required re2c version to 0.13.7.  However, 0.13.5 does not
support default rules, so we cannot use them to fix bug 76813.

This reverts commit 420184ad52 and
5e15c9c41f.

Closes GH-6593.
2021-01-11 17:19:52 +01:00
Remi Collet
9bf43c4590 rename COMPILER and ARCHITECTURE macro (too generic) 2021-01-04 10:13:54 +01:00
Christoph M. Becker
e4e318bad3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Bump minimum re2c version to 0.13.7
2020-12-28 13:44:00 +01:00
Christoph M. Becker
420184ad52 Bump minimum re2c version to 0.13.7
Closes GH-6516.
2020-12-28 13:43:31 +01:00
Gabriel Caruso
9eea9aae10
Prepare for PHP 8.0.2
This was missing from f1f78ac875.
2020-12-15 11:03:21 -03:00
Levi Morrison
36ff92e6fb Remove very old -no-cpp-precomp compatibility flag on Mac
Closes GH-6501.
2020-12-15 10:19:26 +01:00
Nikita Popov
7db29d2186 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80377
2020-11-25 11:48:51 +01:00
Nikita Popov
4633e70ab1 Fixed bug #80377
Make sure the $PHP_THREAD_SAFETY variable is always available
when configuring extensions. It was previously available for
phpized extensions, but for in-tree builds it was being set
too late.

Then, use $PHP_THREAD_SAFETY instead of $enable_zts to check for
ZTS in bundled extensions, which makes sure these checks also
work for phpize builds.
2020-11-25 11:47:05 +01:00
Sara Golemon
3c44e9c080 8.0 branch should be prepping for 8.0.1 2020-11-19 14:37:44 +00:00
Derick Rethans
25643b56a2 Update version in 7.4 branch 2020-11-07 18:48:13 +00:00
Gabriel Caruso
14806e0824
Prepare for PHP 8.1
Closes GH-6305.
2020-10-09 11:37:27 +02:00
Nikita Popov
d3cf597328 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix -Wimplicit-function-declaration in configure
2020-10-05 10:48:04 +02:00
Nikita Popov
9ad5381a2f Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix -Wimplicit-function-declaration in configure
2020-10-05 10:46:46 +02:00
Nikita Popov
aa405b7da2 Fix -Wimplicit-function-declaration in configure
As this is an error with xcode 12, see bug #80171.
2020-10-05 10:43:58 +02:00
Sammy Kaye Powers
12306728c5
Add system ID entropy API
The `zend_system_id` is a (true global) system ID that fingerprints a process state. When extensions add engine hooks during MINIT/startup, entropy is added the system ID for each hook. This allows extensions to identify that changes have been made to the engine since the last PHP process restart.

Closes GH-5871
2020-09-18 14:26:44 -07:00
Christoph M. Becker
edddddcea8 7.3.24 is next 2020-09-15 10:51:41 +02:00
Dmitry Stogov
aae50328e2 decbin/decoct/dechex optimization. 2020-09-08 10:34:29 +03:00
Frank Du
c3299d7dab X86: Fast CRC32 computation using PCLMULQDQ instruction
Based on:
"Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction"
V. Gopal, E. Ozturk, et al., 2009, http://intel.ly/2ySEwL0

Signed-off-by: Frank Du <frank.du@intel.com>

Closes GH-6018
2020-09-02 15:10:41 +02:00
Levi Morrison
66c3e900e2 Add zend_observer API
Closes GH-5857.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
2020-09-01 09:59:59 -06:00
David Carlier
32c6a0bbbb further network libraries detection for Haiku system.
Closes GH-5997.
2020-08-24 11:37:48 +02:00
Christoph M. Becker
ff14b7adad 7.3.23 is next 2020-08-18 09:55:37 +02:00
Derick Rethans
499bf91cd0 Prepare for 7.4.11 2020-08-18 08:06:20 +01:00
Nikita Popov
0d836a39a7 Revert "Prepare for PHP 8.1"
This reverts commit 1ab4d0e6b7.
This reverts commit a359635cb1.
2020-08-04 22:24:44 +02:00
Gabriel Caruso
a359635cb1
Prepare for PHP 8.1 2020-08-04 18:46:14 +02:00
Nikita Popov
e2f39f84e2 Remove PHP_CHECK_GCC_ARG()
In favor of AX_CHECK_COMPILE_FLAG(), which we bundle since at least
PHP 7.

Closes GH-5904.
2020-07-29 15:07:53 +02:00