This was previously implicitly public due to the use of dynamic
properties. Make this internal state private.
If someone complains, we can consider relaxing this to protected
or public on a case-by-case basis.
Currently, _digest is used both to request that digest auth be
used (_digest == null) and to later store the _digest parameters.
This relies on the ability to distinguish between _digest being
null and it being not set, which is not present with declared
properties. (Well, technically it is, we could just leave it
uninitialized, but that would be non-idiomatic.)
Resolve this by splitting into separate _use_digest and _digest
properties.
Error exceptions should generally not be converted into domain-
specific exception types. They indicate programming errors that
should not be handled locally.
This code is used by generic EH_THROW with arbitrary Exception
types, while only ErrorException has a $severity property. We
don't want this code to add $severity properties to random
exception types like PDOException.
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow.
Closes GH-7381.
We're currently only testing prime shm + use shm and prime file +
use file.
This adds testing for the prime shm + use file combination. The
prime file + use shm combination is broken on PHP-8.0, so not
tested.
The IS_UNSERIALIZED check here does not work if the string is
interned (serialized with file_cache_only=0) but unserialization
happens with file_cache_only=1. In this case the unserializde
string will be in the str area after mem, which is not included
in the script size, and which is also not accessible at this
point without threading through more information. Work around
the problem by checking for the serialized representation instead.
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away.
We need to run the full `php_cli_server_request_shutdown()` in case of
failing `php_cli_server_request_startup()`.
Patch contributed by @cataphract.
Closes GH-7322.
Some GCC versions don't like zend_try in loop. Avoid the issue
by pulling it out of the loop, we don't particularly care about
skipping further warnings if a bailout occurs, just that it
does not interrupt shutdown.
Closes GH-7380.