Commit Graph

13835 Commits

Author SHA1 Message Date
Nikita Popov
8a11f1284e Merge branch 'PHP-7.2' into PHP-7.3 2019-09-16 15:01:05 +02:00
Nikita Popov
2f6efd835d Fixed bug #78545
By using an explicit (double) cast.
2019-09-16 15:00:20 +02:00
Christoph M. Becker
cf31210f29 PHP 7.3.10RC1 has been tagged 2019-09-10 15:11:54 +02:00
Nikita Popov
34edd4aa2a Merge branch 'PHP-7.2' into PHP-7.3 2019-08-29 12:33:04 +02:00
Nikita Popov
ed749edd47 Fix use-after-free of immediately invoked closure with extra args 2019-08-29 12:32:03 +02:00
Nikita Popov
461db52400 Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 17:52:37 +02:00
Nikita Popov
589542f50c Remove properties HT from nested GC data
The properties HT may be a GC root itself, so we need to remove it.
I'm not sure this issue actually applies to PHP 7.2, but committing
it there to be safe. As seen from the test case, the handling here
is rather buggy on 7.2.
2019-08-26 17:49:37 +02:00
Nikita Popov
a26f63213d Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 10:26:49 +02:00
Nikita Popov
16d35eb643 Fix overflow in memory limit checks
Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.
2019-08-26 10:25:30 +02:00
Christoph M. Becker
310708845f Fix #78441: Parse error due to heredoc identifier followed by digit
Since digits are allowed for identifiers, we have to cater to them as
well.
2019-08-21 22:51:51 +02:00
Christoph M. Becker
5e19f1d458 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78220: Can't access OneDrive folder
2019-08-19 19:57:22 +02:00
Christoph M. Becker
81f52158b4 Fix #78220: Can't access OneDrive folder
As of Windows 1903, when the OneDrive on-demand feature is enabled, the
OneDrive folder is reported as reparse point by `FindFirstFile()`, but
trying to get information about the reparse point using
`DeviceIoControl()` fails with `ERROR_NOT_A_REPARSE_POINT`.  We work
around this problem by falling back to `GetFileInformationByHandle()`
if that happens, but only if the reparse point is reported as cloud
reparse point, and only if PHP is running on Windows 1903 or later.

The patch has been developed in collaboration with ab@php.net.

We should keep an eye on the somewhat quirky OneDrive behavior, since
it might change again in a future Windows release.
2019-08-19 19:55:35 +02:00
Nikita Popov
be7e819068 Fixed bug #77922
In PHP 7.3 shadow properties are no longer duplicated. Make sure we
only release them if the property was defined on the parent class,
which means that it changed from private->shadow, which is where
duplication does happen.
2019-08-17 10:58:54 +02:00
Nikita Popov
1166359acb Merge branch 'PHP-7.2' into PHP-7.3 2019-08-14 17:51:35 +02:00
Nikita Popov
fcabe7e5e4 Fixed bug #78412
$this should only be included in the generator GC buffer, if it
will be released on destruction.
2019-08-14 17:50:58 +02:00
Christoph M. Becker
5536105b67 Next will be 7.3.10 2019-08-13 23:57:48 +02:00
Christoph M. Becker
fe7997912d Bump version numbers
This should have been done four weeks ago already.
2019-08-13 23:23:43 +02:00
Nikita Popov
7ba54b9822 Merge branch 'PHP-7.2' into PHP-7.3 2019-08-13 09:54:26 +02:00
Nikita Popov
18f2918a0f Don't destroy properties array with unset GC type
As the properties array can also be a GC root, it might have
already been destroyed.
2019-08-13 09:53:25 +02:00
Nikita Popov
4cd563d07e Merge branch 'PHP-7.2' into PHP-7.3 2019-08-12 17:17:30 +02:00
Nikita Popov
f3fdf570b3 Intern alias old_name early
This is likely going to end up interned lateron at some point
when the new_name is referenced somewhere. However, it may be
that there are some uses that do not get interned before that.
In this case we will intern a string that already have zval
users, without updating the refcounted flag on those zvals.

In particular this can happen with something like [Foo::class],
where Foo is an imported symbol. The string it resolves to won't
get interned right away, but may be interned later.

    use Foo as Bar;
    $x = [Bar::class];
    var_dump(Bar::X);
    debug_zval_dump($x); // Will show negative refcount
    class Foo {
        const X = 1;
    }

However, this doesn't really fix the root cause, there are probably
other situations where something similar can occur.
2019-08-12 17:12:28 +02:00
Dmitry Stogov
722a44d515 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed handling of references in nested data of objects with destructor
2019-08-09 17:47:06 +03:00
Dmitry Stogov
9b43e29d9b Fixed handling of references in nested data of objects with destructor 2019-08-09 17:43:50 +03:00
Dmitry Stogov
22d23e08c9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed second part of the bug #78379 (Cast to object confuses GC, causes crash)
2019-08-09 15:58:16 +03:00
Dmitry Stogov
6b1cc1252e Fixed second part of the bug #78379 (Cast to object confuses GC, causes crash) 2019-08-09 15:42:39 +03:00
Dmitry Stogov
21a0a28fd0 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Added asserts to catch GC errors when refcount goes below zero.
2019-08-09 13:39:59 +03:00
Dmitry Stogov
2e2cd65d73 Added asserts to catch GC errors when refcount goes below zero. 2019-08-09 13:37:23 +03:00
Nikita Popov
38f10ff5cf Fix GC tracing
Due to the GC changes in 7.3 we stopped tracing most of the
interesting coloring changes...
2019-08-08 10:54:18 +02:00
Dmitry Stogov
bff2743caf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78379 (Cast to object confuses GC, causes crash)
2019-08-08 10:05:59 +03:00
Dmitry Stogov
358379be22 Fixed bug #78379 (Cast to object confuses GC, causes crash) 2019-08-08 10:00:39 +03:00
Nikita Popov
d89157cd67 Add test for bug #78363 2019-08-02 10:37:44 +02:00
Nikita Popov
e1934f8515 Merge branch 'PHP-7.2' into PHP-7.3 2019-08-02 10:35:48 +02:00
Nikita Popov
85e8ccd55e Fixed bug #78363 2019-08-02 10:35:24 +02:00
Nikita Popov
bbed5564eb Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 16:57:57 +02:00
Nikita Popov
38f1288b64 Fix Zend signals unblocking
There are a few parts here:
 * opcache should not be blocking signals while invoking compile_file,
   otherwise signals may remain blocked on a compile error. While at
   it, also protect SHM memory during compile_file.
 * We should deactivate Zend signals at the end of the request, to make
   sure that we gracefully recover from a missing unblock and signals
   don't remain blocked forever.
 * We don't use a critical section in deactivation, because it should
   not be necessary. Additionally we want to clean up the signal queue,
   if it is non-empty.
 * Enable SIGG(check) in debug builds so we notice issues in the future.
2019-07-29 15:17:32 +02:00
George Peter Banyard
e7e66d5275 Convert short tag to standard tag in Zend test file
Closes GH-4389.

(cherry picked from commit e6c2b28865)
2019-07-16 15:27:50 +02:00
Dmitry Stogov
c570980175 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed incorrect specialization (missed IS_INDIRECT handling)
2019-07-16 01:52:11 +03:00
Dmitry Stogov
9ccf3fb996 Fixed incorrect specialization (missed IS_INDIRECT handling) 2019-07-16 01:50:10 +03:00
Nikita Popov
193f28c7d5 Fixed bug #78010
Prevent the gc_info from becoming all zero for a registered root
by setting the top bit to one for compressed root addresses.
2019-07-15 12:00:30 +02:00
Nikita Popov
e7a83ec8df Fix bug #78271
When cleaning nops in the dfa pass, we were always keeping the
smart branch inhibiting nop that occurs directly before the jump
instruction. However, as we skip unreachable blocks entirely, it
may happen that we need to keep a nop that occurs further back,
prior to the unreachable blocks. Account for that case now.

We should really do something about the smart branch situation,
this is very fragile...
2019-07-10 17:25:40 +02:00
Nikita Popov
825f47564a Merge branch 'PHP-7.2' into PHP-7.3 2019-07-09 11:05:18 +02:00
Nikita Popov
22ed362810 Revert "Fixed bug #76980"
This reverts commit 35353dc49a.

This changes causes issues for Symfony, see
https://github.com/symfony/symfony/issues/32395. I'm reverting it
from PHP 7.2 and PHP 7.3 and only leaving it in PHP 7.4.
2019-07-09 11:04:16 +02:00
Nikita Popov
19d0a51533 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-28 16:09:09 +02:00
sunnyeo
f7327b6244 Fix bugs in AST printer
Closes GH-4324.
2019-06-28 16:08:44 +02:00
Christoph M. Becker
bcf20963c1 Next is 7.3.8 2019-06-11 13:31:30 +02:00
Joe Watkins
6c73b2088a
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  disabled functions must not have return type
2019-05-29 08:30:41 +02:00
Joe Watkins
7821cc3b9f
disabled functions must not have return type 2019-05-29 08:30:08 +02:00
Nikita Popov
6f9dfd9473 Fix bug #77955
Free metadata before freeing the arena. I don't have a repro script,
but the added assertion fails for many existing tests prior to this
change.
2019-05-23 13:40:52 +02:00
Nikita Popov
5846119e50 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-15 12:48:35 +02:00
Nikita Popov
35353dc49a Fixed bug #76980
If we perform a class fetch that is not marked as exception safe,
convert exceptions thrown by autoloaders into a fatal error.

Ideally fetching the interfaces would be exception safe, but as it
isn't right now, we must abort at this point.
2019-05-15 12:46:23 +02:00