1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Commit Graph

13079 Commits

Author SHA1 Message Date
Christoph M. Becker
99c78963c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test for x86 Windows
2020-07-13 10:53:55 +02:00
Christoph M. Becker
e2c17cef4b Fix test for x86 Windows
`st_dev` deliberately overflows on such systems, cf.
<http://svn.php.net/viewvc?view=revision&revision=350100>.
2020-07-13 10:52:26 +02:00
twosee
c0172aa2bd debug_zval_dump(): Don't skip recursion detection on first level
A complement to ae6f45ad45

Closes GH-5843.
2020-07-12 03:08:42 +08:00
twosee
614b2191bd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed BC break of php_debug_zval_dump
2020-07-11 18:32:18 +08:00
twosee
7a39e174aa Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed BC break of php_debug_zval_dump
2020-07-11 18:31:30 +08:00
twosee
f0b2c2cb98 Fixed BC break of php_debug_zval_dump
It introduced by fixing bug #79830
2020-07-11 18:30:28 +08:00
twosee
40efb7ad61 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79830 introduced by fixing bug #79821

# Conflicts:
#	ext/standard/var.c
2020-07-11 14:40:17 +08:00
twosee
6ef08b1903 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79830 introduced by fixing bug #79821
2020-07-11 14:38:27 +08:00
twosee
56dec3cc73 Fixed bug #79830 introduced by fixing bug #79821
This also fixes memory error in debug_zval_dump and var_export.
2020-07-11 14:37:25 +08:00
twosee
342fe094b5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79821
2020-07-11 06:19:41 +08:00
twosee
8db2ae8ffb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79821
2020-07-11 06:15:28 +08:00
twosee
150504e6b1 Fixed bug #79821
HashTable was reallocated (zend_hash_packed_grow) during php_var_dump, so we should call GC_ADDREF to make SEPARATE_ARRAY work.

Closes GH-5837.
2020-07-11 06:14:22 +08:00
Máté Kocsis
d30cd7d7e7 Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00
Christoph M. Becker
2ad75ba784 Fix test cases
These tests are not supposed to check the result of `fclose(false)`.
2020-07-10 18:27:18 +02:00
Nikita Popov
12214e1d46 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79817
2020-07-10 14:07:59 +02:00
Nikita Popov
3f8d71d37f Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79817
2020-07-10 14:07:17 +02:00
Nikita Popov
a72c53a070 Fixed bug #79817
Use *_IND macros in a few places in string.c.
2020-07-10 14:06:41 +02:00
Christoph M. Becker
9a5695bfc3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable further ext/standard/tests/file tests on Windows
2020-07-10 13:42:13 +02:00
Christoph M. Becker
99aa5484e2 Enable further ext/standard/tests/file tests on Windows 2020-07-10 13:36:41 +02:00
Christoph M. Becker
ef1de5e973 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix skip reasons
2020-07-10 11:28:28 +02:00
Christoph M. Becker
7edc5e5e39 Fix skip reasons
These tests fail on Windows for different reasons, but not because
symlinks, links, or lstat() would not be supported on Windows
generally.
2020-07-10 11:26:48 +02:00
Christoph M. Becker
bdcda50304 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable symlink_link_linkinfo_is_link_* tests on Windows
2020-07-10 10:10:30 +02:00
Christoph M. Becker
68293b19d4 Enable symlink_link_linkinfo_is_link_* tests on Windows
We mark symlink_link_linkinfo_is_link_error2.phpt as XFAIL on Windows
ZTS.  Several Windows API file system functions ignore trailing spaces
in absolute filenames after the final directory separator, which causes
`link(' ', $link)` to actually call `CreateHardLink()` which then
fails, because linking folders is not supported.  However, with NTS
builds (as well as on other systems), the $target is found to not
exist, so the function fails without actually attempting to create the
link.  This needs further investigation.
2020-07-10 10:08:12 +02:00
Ilija Tovilo
9fa1d13301 Implement match expression
RFC: https://wiki.php.net/rfc/match_expression_v2

Closes GH-5371.
2020-07-09 23:52:17 +02:00
George Peter Banyard
af1de14802 Use ZPP string|array union check in PCRE extension 2020-07-09 14:17:19 +02:00
Christoph M. Becker
e33dd6ab1f Merge branch 'PHP-7.4'
* PHP-7.4:
  Prevent parallel test conflicts
2020-07-09 12:36:57 +02:00
Christoph M. Becker
db484b612d Prevent parallel test conflicts
Both tests used the same folder, which could clash in case the tests
are run simultaneously.
2020-07-09 12:35:31 +02:00
Nikita Popov
302933daea Remove no_separation flag 2020-07-07 09:30:24 +02:00
Nikita Popov
dadb92ea35 Don't allow separation in array functions
The only case here that might be *somewhat* sensible is the userdata
argument of array_walk(), which could be used to keep persistent state
between callback invokations -- with the WTF moment that the final
result after the walk finishes will be unchanged. Nowdays, this is
much better achieved using a closure with a use-by-reference.
2020-07-07 09:15:43 +02:00
George Peter Banyard
c4a0ba8d6e Refactor levenshtein()
Closes GH-5816
2020-07-07 00:41:10 +02:00
Max Semenik
2b5de6f839 Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
0280b83e11 Avoid some unnecessary uses of no_separation=0
For the rare cases where references are part of the API,
construct them explicitly. Otherwise do not allow separation.
2020-07-06 19:05:57 +02:00
Remi Collet
ad0d2e438f display info about system used to build and its provider 2020-07-06 10:54:43 +02:00
Christoph M. Becker
fecea7b89c Fix sapi_windows_vt100_support() arginfo 2020-07-06 10:48:10 +02:00
Christoph M. Becker
62f05ac01f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests for x86 Windows
2020-07-03 10:39:00 +02:00
Christoph M. Becker
a58d865f65 Fix tests for x86 Windows
`st_dev` deliberately overflows on such systems, cf.
<http://svn.php.net/viewvc?view=revision&revision=350100>.
2020-07-03 10:37:40 +02:00
Christoph M. Becker
807d6c0418 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip test if SeCreateSymbolicLinkPrivilege is not given
2020-07-03 09:10:37 +02:00
Christoph M. Becker
1b961c0c42 Skip test if SeCreateSymbolicLinkPrivilege is not given 2020-07-03 09:08:59 +02:00
Christoph M. Becker
e2be50001b Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable readlink_realpath_* tests on Windows
2020-07-02 18:31:43 +02:00
Christoph M. Becker
6f0b73345a Enable readlink_realpath_* tests on Windows
We modify _basic1.phpt so it runs on Windows as well.  The other test
cases hit the issue that `readlink()` fails normally for regular files,
but succeeds on Windows[1].  Therefore, we split these tests, but still
fix the skip reasons.

[1] <http://svn.php.net/viewvc?view=revision&revision=350097>
2020-07-02 18:24:42 +02:00
Christoph M. Becker
1f12d9da5c Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable most lstat_stat_* tests on Windows
2020-07-02 15:36:43 +02:00
Christoph M. Becker
1973ca21bd Enable most lstat_stat_* tests on Windows
Most of these have been skipped on Windows for no good reason (`lstat`
is available there as of PHP 4).  Several others would only fail,
because the `blksize` and `blocks` elements are always `-1` on Windows,
which can easily be fixed by using `%i` format specifiers instead of
`%d`.
2020-07-02 15:36:07 +02:00
Christoph M. Becker
66a5f9fb18 Merge branch 'PHP-7.4'
* PHP-7.4:
  Extract test helper function for SeCreateSymbolicLinkPrivilege check
2020-07-02 12:24:49 +02:00
Christoph M. Becker
c49fb83c38 Extract test helper function for SeCreateSymbolicLinkPrivilege check 2020-07-02 12:23:49 +02:00
codinghuang
5ea28fe6c4 Use correct ZPP mechanism in get_class_methods()
From now on, instead of returning null, an exception is thrown when
not a string or an object is passed to the function.

Closes GH-5792
2020-07-02 11:40:05 +02:00
Eddie Kohler
ada776c84c Make HashContexts serializable.
* Modify php_hash_ops to contain the algorithm name and
  serialize and unserialize methods.

* Implement __serialize and __unserialize magic methods on
  HashContext.

Note that serialized HashContexts are not necessarily portable
between PHP versions or from architecture to architecture.
(Most are, though Keccak and slow SHA3s are not.)

An exception is thrown when an unsupported serialization is
attempted.

Because of security concerns, HASH_HMAC contexts are not
currently serializable; attempting to serialize one throws
an exception.

Serialization exposes the state of HashContext memory, so ensure
that memory is zeroed before use by allocating it with a new
php_hash_alloc_context function. Performance impact is
negligible.

Some hash internal states have logical pointers into a buffer,
or sponge, that absorbs input provided in bytes rather than
chunks. The unserialize functions for these hash functions
must validate that the logical pointers are all within bounds,
lest future hash operations cause out-of-bounds memory accesses.

* Adler32, CRC32, FNV, joaat: simple state, no buffer positions
* Gost, MD2, SHA3, Snefru, Tiger, Whirlpool: buffer positions
  must be validated
* MD4, MD5, SHA1, SHA2, haval, ripemd: buffer positions encoded
  bitwise, forced to within bounds on use; no need to validate
2020-06-30 14:30:33 +02:00
Eddie Kohler
ff69a8a789 Move __alignof__ support check into main configure.ac. 2020-06-30 14:26:48 +02:00
Máté Kocsis
e93d20ad7e Add ZPP macros for class name or object parameters
Closes GH-5647
2020-06-30 11:19:30 +02:00
Christoph M. Becker
8c11d8fedb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #70362: Can't copy() large 'data://' with open_basedir
2020-06-30 10:48:58 +02:00
Christoph M. Becker
993b19ae69 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #70362: Can't copy() large 'data://' with open_basedir
2020-06-30 10:48:07 +02:00