| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This flag enabled msan late in the pipeline, so that it does
not affect configure checks.
Otherwise we get a false positive report for openpty availability
without -lutil, which will then result in infinite recursion if
actually called.
This also sets origin tracking to 2, so bump the timeout to 90
minutes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Back in 2004, a feature was added to proc_open which allowed it to open a PTY,
connecting specific FDs in the child process to the slave end of the PTY and returning
the master end of the PTY (wrapped as a PHP stream) in the `$pipes` array. However,
this feature was disabled just about a month later. Little information is available
about why this was done, but from talking to the original implementer, it seems there
were portability problems with some rare flavors of Unix.
Re-enable this feature with a simplified implementation which uses openpty(). No
attempt is made to support PTYs if the platform does not have openpty(). The configure
script checks if linking with -lutil is necessary to use openpty(), but if anything
else is required, like including some special header or linking with some other library,
PTY support will be disabled.
The original PTY support for proc_open automatically daemonized the child process
(disassociating it from the TTY session and process group of the parent). However,
I don't think this is a good idea. Just because a user opens a child process in a
PTY, it doesn't mean they want it to continue running even when the parent process
is killed. Of course, if the child process is some kind of server, it will likely
daemonize itself; but we have no reason to preempt that decision.
It turns out that since 2015, there has been one test case for PTY support in
proc_open() in the test suite. This test was added in GitHub PR #1588
(https://github.com/php/php-src/pull/1588). That PR mentioned that the PHP
binary in the Debian/Ubuntu repositories is patched to *enable* PTY support. Checking
the Debian PHP repository (https://salsa.debian.org/php-team/php.git) shows that this
is still true. Debian's patch does not modify the implementation from 2004 in any
way; it just removes the #if 0 line which disables it.
Naturally, the test case is skipped if PTY support is not enabled. This means that ever
since it was added, every test run against the 'vanilla' PHP codebase has skipped it.
Interestingly, the test case which was added in 2015 fails on my Linux Mint PC... both
with this simplified implementation *and* when enabling the original implementation.
Investigation reveals the reason: when the child process using the slave end of the
PTY exits and its FDs are all closed, and all buffered data is read from the master
end of the PTY, any further attempt to read from the master end fails with EIO. The
test case seems to expect that reading from the master end will always return an
empty string if no data is available.
Likely this is because PHP's fread() was updated to report errors from the underlying
system calls only recently.
One way out of this dilemma: IF at least one FD referring to the slave end of the PTY is
kept open *in the parent process*, the failure with EIO will not occur even after the child
process exits. However, that would raise another issue: we would need a way to ensure the FD
will be closed eventually in long-running programs.
Another discovery made while testing this code is that fread() does not always return
all the data written to the slave end of the PTY in a single call, even if the data was
written with a single syscall and it is only a few bytes long.
Specifically, when the child process in the test case writes "foo\n" to the PTY, the parent
sometimes receives "foo" (3 bytes) and sometimes "foo\r\n" (5 bytes). (The "\r" is from the
TTY line discipline converting "\n" to "\r\n".) A second call to fread() does return the
remaining bytes, though sometimes all the data is read in the first call, and by the time
the second call is made, the child process has already exited. It seems that liberal use
of the @ operator is needed when using fread() on pipes.
Thanks to Nikita Popov for suggesting that we should just use openpty() rather than
grantpt(), unlockpt(), etc.
|
|\
| |
| |
| |
| |
| | |
* PHP-7.4:
Fix lcov genhtml: ERROR: cannot read [file]
Properly detect CRC32 APIs on aarch64 from configure
|
| |
| |
| |
| |
| |
| |
| | |
The CRC32 APIs are optional for armv8-a. They became mandatory since
armv8.1-a.
Closes GH-5564.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I reverted this previously for 7.4 because of bug #78769. Relanding
it now for master, because I still believe that this change is
right, and if it causes complications, those indicate a bug elsewhere.
---
These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.
This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.
|
| |
| |
| |
| |
| |
| | |
Therefore, don't bother checking for it in 'configure' script.
Closes GH-5453
|
| | |
|
| |
| |
| |
| |
| | |
We already use our own mt13397 implementation nowadays, so we no
longer need this shim.
|
| |
| |
| |
| |
| |
| |
| | |
We do not actually use realpath(), but a custom implementation.
Make sure the realpath() function is always available.
Closes GH-5290.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Check for sys/auxv.h before using it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes aarch64 compile with uclibc-ng (does not provide
sys/auxv.h header file).
Closes GH-5248.
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
| | |
|
| |
| |
| |
| |
| |
| | |
php_mergesort() isn't being used for anything, and hasn't been for
a long time. Even if we wanted to use a stable sort, this isn't
the implementation we'd use...
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Don't use VLA in mysqlnd auth
|
| |
| |
| |
| |
| | |
We use alloca instead of VLA. This should also allow building
this code on Windows.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fixed bug #79092 (Building with clang+lld-9 results in a broken PHP binary)
|
| | |
|
| |
| |
| |
| | |
We must not forget to update the version in configure.ac as well.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Closes GH-4966
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #78788: ./configure generates invalid php_version.h
|
| |
| |
| |
| |
| | |
Change $SED to "${SED}" such that the IFS is not used to split the
output of that variable.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Revert "Remove configure checks for supported instruction sets"
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit edccf32f7f36a8bc759b9482737e0c3efcb3a005.
This was reported to cause issues for as yet unknown reasons in
bug #78769. As this was intended as code cleanup, revert this from
7.4 at least. May reapply it to master later.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Remove configure checks for supported instruction sets
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.
This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.
|
| |
| |
| |
| | |
The major version number is no longer included.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
gcov builds can also be used with other tools like gcovr, so remove
the hard dependency on LTP.
|
| |
| |
| |
| | |
This reverts commit db094b4b2e5ef0f0c30f412ce3a2516e31e17da7.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
C99 no longer has implicit function declarations and implicit ints.
Current GCC versions enable them as an extension, but this will
change in a future GCC version.
|
|\ \
| |/
| |
| |
| |
| | |
* PHP-7.4:
Update NEWS
Fix #78460: PEAR installation failure
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When building PHP outside of the source tree:
mkdir custom-build-dir
cd custom-build-dir
../path/to/php-src/configure
The directories need to be manually created including the pear directory
so the pear installation PHAR file doesn't need to be downloaded from
the remote location.
Closes GH-4639
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Remove outdated Libtool hack for macs
|
| |
| |
| |
| |
| |
| | |
This was once relevant for older versions of macs and autoconf 2.13.
Closes GH-4435
|
| |
| |
| |
| |
| |
| |
| | |
This was a left over for supporting old code in PHP extensions out there.
Check is not needed anymore since this is part of C89+ standard.
Closes GH-4445
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Remove duplicate socklen_t check
|
| |
| |
| |
| |
| |
| | |
- Use Autoconf's default AC_CHECK_TYPES
Closes GH-4418
|
|\ \
| |/
| |
| |
| |
| | |
* PHP-7.4:
Update changelog
Remove unused build checks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- yp_get_default_domain was part of ext/yp
- functions checks produce HAVE_function_name symbols. These checks are
currently not used in php-src neither in the extensions out there.
- Removed symbols because they are not used in the code:
- HAVE_GCVT
- HAVE_PUTENV
- HAVE_PUTENV
- HAVE_SETVBUF
- HAVE_TEMPNAM
- HAVE_SIN (sin is also defined in C89 standard)
- HAVE_SETSOCKOPT
- HAVE_LOCKF
- HAVE_ISASCII
- HAVE_YP_GET_DEFAULT_DOMAIN (and other yp extension related unused checks)
- HAVE_LINK
- HAVE_USLEEP is already defined in Windows configuration header
- HAVE_LIBBIND has not been used in php-src for a while anymore
- HAVE_GETHOSTNAME is duplicated in Windows configuration header
Closes GH-4417
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Remove usage of PHP_AIX_LDFLAGS
|
| |
| |
| |
| |
| |
| |
| | |
These are currently not defined since their usage has been removed via
51ca2dba530883a8e07d6869e66ee6c5b3c978a6
and
53349d69ddf7a2ba128f0928fb3b376422611a3b
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Remove duplicate PTHREADS template define
|