Commit Graph

119237 Commits

Author SHA1 Message Date
Máté Kocsis
b5c7a83dca
Remove unnecessary PHPDoc-alike blocks from tests
Closes GH-5759
2020-06-24 13:13:44 +02:00
Nikita Popov
187d7f05c2 Fix potential use-after-scope if crypt_r is used 2020-06-24 13:07:00 +02:00
Nikita Popov
d579b10c84 Remove deprecated DES fallback in crypt() 2020-06-24 12:57:04 +02:00
Nikita Popov
8a8c8d4d6a Enforce min/max rounds in sha256/sha512 crypt
This brings our implementation in line with glibc behavior.
2020-06-24 12:41:56 +02:00
Nikita Popov
4c4af2b2e1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Handle *0 / *1 more consistently
2020-06-24 12:22:44 +02:00
Nikita Popov
565baf05c0 Handle *0 / *1 more consistently
Avoid throwing a DES salt deprecation warning if the libc crypt
implementation is used.
2020-06-24 12:22:07 +02:00
Nikita Popov
7d05bc8630 Fix crypt_r detection
And force use of our own php_crypt_r implementation to keep
previous behavior despite that.
2020-06-24 12:09:49 +02:00
Christoph M. Becker
38177dcb42 Properly initialize displaysize
From Microsoft's `SQLColAttribute()` documentation[1]:

| Please note that some drivers may only write the lower 32-bit or
| 16-bit of a buffer and leave the higher-order bit unchanged.
| Therefore, applications should initialize the value to 0 before
| calling this function.

[1] <https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolattribute-function>
2020-06-24 12:07:58 +02:00
Máté Kocsis
16fe64d3ed
Add ZEND_ACC_NO_DYNAMIC_PROPERTIES flag to SysvMessageQueue 2020-06-24 12:04:10 +02:00
Nikita Popov
653e4ea1c5 Add flag to forbid dynamic property creation on internal classes
While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-clonable
(unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES
flag, that also forbids the creation of dynamic properties on these objects.
This is a subset of #3931 and targeted at internal usage only
(though may be extended to userland at some point in the future).

It's already possible to achieve this (what the removed
WeakRef/WeakMap code does), but there's some caveats: First, this
simple approach is only possible if the class has no declared
properties, otherwise it's necessary to special-case those
properties. Second, it's easy to make it overly strict, e.g. by
forbidding isset($obj->prop) as well. And finally, it requires a
lot of boilerplate code for each class.

Closes GH-5572.
2020-06-24 11:52:36 +02:00
Christoph M. Becker
2a28589c7d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix potential environment variable deadlock
2020-06-24 11:44:47 +02:00
Christoph M. Becker
32257ac17f Fix potential environment variable deadlock
We have to unlock the environment before bailing out.
2020-06-24 11:44:07 +02:00
Christoph M. Becker
cbce0cbacb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #69804: ::getStaticPropertyValue() throws on protected props
2020-06-24 11:19:17 +02:00
Christoph M. Becker
26aefb750a Fix #69804: ::getStaticPropertyValue() throws on protected props
`ReflectionClass` allows reading of the values of private and protected
constants, and also to get private and protected static methods.
Therefore getting the values of private and protected static properties
is also permissible, especially since `::getStaticProperties()` already
allows to do so.

We also allow ::setStaticPropertyValue() to modify private and
protected properties, because otherwise this method is useless, as
modifying public properties can be done directly.
2020-06-24 11:17:36 +02:00
Nikita Popov
59c4c8297b Add test case for previous commit
Forgot to "git add".
2020-06-24 10:51:51 +02:00
Nikita Popov
d071ab1928 Fix verify arg jit for references 2020-06-24 10:47:37 +02:00
Christoph M. Becker
26badd58b5 Mark phpdbg test as XFAIL on Windows with JIT enabled
The test fails as of commit 8b12ea04ee.
2020-06-24 10:34:16 +02:00
Nikita Popov
c008fde961 Skip two curl tests under asan
These tests leak with the curl version on ubuntu 20.04. This should
be fixed when we switch exit to use an exception.
2020-06-24 10:13:25 +02:00
Christoph M. Becker
1dfeb70e6b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79487: ::getStaticProperties() ignores property modifications
2020-06-24 10:08:51 +02:00
Christoph M. Becker
ef2130db88 Fix #79487: ::getStaticProperties() ignores property modifications
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
2020-06-24 10:05:51 +02:00
Nikita Popov
c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Alex Dowad
d1ebc3ab21 Increase failure threshold for 'extensive backtracking' fileinfo test
A spurious failure for this test was seen on Travis CI (S390X):

https://travis-ci.org/github/alexdowad/php-src/jobs/701533828

(The test is expected to finish within 1 second, but it took 1.06 seconds.)
Therefore, increase the threshold a bit.
2020-06-24 08:46:19 +02:00
Máté Kocsis
ba434fb5a6
Remove outdated PHPDoc from ext/enchant's stub 2020-06-23 22:35:27 +02:00
Dmitry Stogov
8b12ea04ee Improved JIT for RECV and RECV_INIT instructions 2020-06-23 23:21:56 +03:00
George Peter Banyard
6079bdb287 Use standard bool type in EXIF extension 2020-06-23 20:57:26 +02:00
Christoph M. Becker
cf70026ebc Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Fix #79487: ::getStaticProperties() ignores property modifications"
2020-06-23 19:30:12 +02:00
Christoph M. Becker
f3cccfde9e Revert "Fix #79487: ::getStaticProperties() ignores property modifications"
This reverts commit a895bb6885.
2020-06-23 19:28:51 +02:00
Christoph M. Becker
f1d0eadc4d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79487: ::getStaticProperties() ignores property modifications
2020-06-23 18:52:16 +02:00
Christoph M. Becker
a895bb6885 Fix #79487: ::getStaticProperties() ignores property modifications
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
2020-06-23 18:48:54 +02:00
Máté Kocsis
f3b1f342c8
Deprecate the procedural API of ext/zip
Closes GH-5746
2020-06-23 17:39:29 +02:00
Dmitry Stogov
da1c672424 Replace exceptional code by side exit to VM 2020-06-23 18:31:42 +03:00
Dmitry Stogov
e2a8b3e120 Cleanup and better register usage 2020-06-23 17:51:02 +03:00
Dmitry Stogov
6ac16882d4 Reduce amount of "cold" code generated for FETCH_OBJ_* instructions 2020-06-23 17:16:44 +03:00
Alex Dowad
7a9f0cc3d0 Simplify _crypt_extended_init_r, and fix redundant initialization on Win32/Solaris
Looking at the history of this function, the original implementation had a bug where
it would return from the middle of the function without unlocking the mutex first.
The author attempted to fix this by incrementing the `initialized` flag atomically,
which is not necessary, since the section which modifies the flag is protected by a
mutex.

Coincidentally, at the same time that all this unnecessary 'atomic' machinery was
introduced, the code was also changed so that it didn't return without unlocking the
mutex. So it looks like the bug was fixed by accident.

It's not necessary to declare the flag as `volatile` either, since it is protected
by a mutex.

Further, the 'fixed' implementation was also wrong in another respect: on Windows
and Solaris, the `initialized` flag was not even declared as `static`!! So the
initialization of the static tables for S-boxes, P-boxes, etc. was repeated on
each call to `php_crypt`, completely defeating the purpose of this function.
2020-06-23 16:10:54 +02:00
Christoph M. Becker
9bd648ba1e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #55857: ftp_size on large files
2020-06-23 16:02:19 +02:00
Christoph M. Becker
e7bbac9d11 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #55857: ftp_size on large files
2020-06-23 16:00:11 +02:00
Christoph M. Becker
e94126aac7 Fix #55857: ftp_size on large files
`atol()` returns a `long` which is not the same as `zend_long` on
LLP64; we use `ZEND_ATOL()` instead.

There is no need for a new test case, since filesize_large.phpt already
tests for that behavior; unfortunately, the FTP test suite relies on
`pcntl_fork()` and therefore cannot be run on Windows.
2020-06-23 15:57:24 +02:00
Máté Kocsis
b981662855
Fix a couple of UNKNOWN default values in ext/session
Closes GH-5752
2020-06-23 15:42:59 +02:00
Nikita Popov
35729b7604 Remove unnecessary initialization in phpdbg webhelper
This whole code is very dubious and should possibly be dropped. For
now just fix the build warning.
2020-06-23 14:29:24 +02:00
Nikita Popov
361aa1ea48 Enable dba on azure
Closes GH-5756.
2020-06-23 14:29:24 +02:00
Máté Kocsis
8d93ae1a23
Fix UNKNOWN default values in ext/readline
Closes GH-5755
2020-06-23 12:52:12 +02:00
Dmitry Stogov
bdac60d2c0 Improve JIT for SEPARATE_ARRAY 2020-06-23 13:46:56 +03:00
Nikita Popov
5794fbf5f8 Fix missing initializers in dba inifile 2020-06-23 12:41:10 +02:00
Nikita Popov
40d162e423 Merge branch 'PHP-7.4'
* PHP-7.4:
  Restore XFAIL on fpm test
2020-06-23 12:36:04 +02:00
Nikita Popov
f7a3cb4c39 Avoid convert_to_long_ex usage in readline 2020-06-23 12:35:51 +02:00
Nikita Popov
c4639a2deb Restore XFAIL on fpm test
Still fails intermittently.
2020-06-23 12:35:11 +02:00
Nikita Popov
334b9059fa Update azure pipelins to ubuntu 20.04
Only updating the main job for now, to see how it goes.

Closes GH-5741.
2020-06-23 12:16:52 +02:00
Dmitry Stogov
c973f19744 Improve spill code 2020-06-23 12:27:14 +03:00
Dmitry Stogov
5681eaf5e5 Avoid register spilling 2020-06-23 11:40:36 +03:00
Christoph M. Becker
f7dacdbf58 Merge branch 'PHP-7.4'
* PHP-7.4:
  7.3 is now 7.3.21-dev
2020-06-23 10:34:44 +02:00