Xinchen Hui [Mon, 11 Jun 2018 13:01:10 +0000 (21:01 +0800)]
Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
Remove inappropriate FreeLibrary calls
Remove inappropriate FreeLibrary call
The ZEND_EXTENSION change is merged with xdebug now so we can drop this for master only
Fixed bug #76443 (php+php_interbase.dll crash on module_shutdown)
Peter Kokot [Sun, 10 Jun 2018 18:42:57 +0000 (20:42 +0200)]
Remove revision from OCI8 extension
The revisions were used in SVN. Other core extensions don't
provide this information in the phpinfo output anymore so
this patch removes it from the OCI8 info output to make it
consistent with other extensions.
According to https://wiki.php.net/rfc/image2wbmp, we deprecate
`image2wbmp()`, rename the `$threshold` parameter to `$foreground`, and
remove superfluous code.
Nikita Popov [Sat, 9 Jun 2018 19:28:30 +0000 (21:28 +0200)]
Fix handling of ERROR zval in op1 of ASSIGN_REF
If op1 is ERROR the behavior is to not perform any assignment and
return NULL. However, if the RHS was a by-value returning function,
we'd instead emit a notice and return the RHS as the return value
(even though the value was not assigned to anything -- the temporary
is immediately destroyed).
This normalized the behavior to always check for an ERROR in op1
first.
Anatol Belski [Sat, 9 Jun 2018 18:27:16 +0000 (20:27 +0200)]
Add check for variable size array feature
Usage of VLA is not portable, wile supported by some compilers. For
instance, GCC supports it even if -std=c89 is passed. Even if we would
switch to C99, it would be still not portable at least with VC++. Thus,
adding a centralized check so such code can be guarded and moved to
alloca() if needed.
Nikita Popov [Sat, 9 Jun 2018 16:36:54 +0000 (18:36 +0200)]
Error on by-ref assign to overloaded prop returning ref
This error was already thrown if __get() was used -- however not
if it returned by reference. This is incorrect, because the
reference return makes no difference to a by-reference assignment,
which has reference-breaking semantics. The result was that the
assignment was accepted silently, even though it didn't do anything
(not even the value was assigned, let alone the reference).
Fix #76409: heap use after free in _php_stream_free
We must not close the stream in exif_read_from_impl(), since it is the
responsibility of the (caller's) caller to do so, if it actually opened
the stream.
We simplify the reproduce script, which is actually about supplying a
path to a directory (opposed to a regular file), and use `.` instead of
`/` to also make it work on Windows.
Peter Kokot [Sun, 3 Jun 2018 03:23:15 +0000 (05:23 +0200)]
Remove exif version from the phpinfo output
This patch removes the exif version in the phpinfo output to sync it
with the rest of the php bundled extensions. Also in the past the
revision id from the version control system was used and is today not
needed anymore.
Nikita Popov [Sat, 9 Jun 2018 11:15:37 +0000 (13:15 +0200)]
Don't use UNREFs during array operations
Perform DEREFs instead. We were already doing this in some, but not
all places.
While UNREFs are supposed to be transparent, in practice they have
rare observable side effects. Calling array_merge() on an array
should never change how that array behaves.
Nikita Popov [Fri, 8 Jun 2018 22:29:33 +0000 (00:29 +0200)]
Fix handling of assign-ops on overloaded props with ref return
Assign-ops and incdec on overloaded properties are implemented
using a read_property followed by write_property. Previously, if
__get() returned by-reference, pre-incdec and assign-op
additionally also modified the reference, while post-incdec worked
correctly.
This change synchronizes the three code-paths to not modify the
reference. The pre-incdec implementation matches the post-incdec
implementation, the assign-op implementation uses a distinct
result operand.
Keyur Govande [Mon, 4 Jun 2018 19:22:50 +0000 (15:22 -0400)]
Avoid leaking the urandom fd
When Apache is reloaded, it unloads the extension, but the open file descriptor to /dev/urandom is left hanging around and is leaked. This fixes the bug.
Duplicate of https://github.com/jedisct1/libsodium-php/pull/173
Since commit 2238403 removed respective trailing WS in files generated
by this script, we remove the trailing WS in the first place, to avoid
further mundane merge conflicts.
Peter Kokot [Sat, 2 Jun 2018 15:59:26 +0000 (17:59 +0200)]
Sync tidy phpinfo extension version
This patch removes the tidy extension Git ident attribute blob name from
the phpinfo output to be synced with other extensions versioning system
and replaces table header with normal row in the first tidy info table.
Peter Kokot [Sat, 2 Jun 2018 02:11:57 +0000 (04:11 +0200)]
Normalize Reflection phpinfo() output
This patch normalizes the Reflection extension version in the phpinfo
output. It removes the Git attributes ident blob object name from Git
repository as an extension version.
Also the table output is synced with other extensions (i.e. enabled
in a row instead of table header).
Peter Kokot [Sat, 2 Jun 2018 01:30:54 +0000 (03:30 +0200)]
Normalize filter phpinfo() output
This patch normalizes the filter extension version in the php info
output. Instead of the Git attributes ident blob object name from Git
repository only extension status is displayed.
Peter Kokot [Sat, 2 Jun 2018 01:10:24 +0000 (03:10 +0200)]
Normalize sysvmsg phpinfo() output
This patch normalizes the sysvmsg extension version in the php info
output. Instead of the Git attributes ident blob object name from Git
repository it only displays the extension status.