Bug #78989 [Opn->Csd]: Delayed variance check involving trait segfaults
Edit report at https://bugs.php.net/bug.php?id=78989&edit=1
ID: 78989
Updated by: nikic@php.net
Reported by: nikic@php.net
Summary: Delayed variance check involving trait segfaults
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 7.4Git-2019-12-18 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1146bdb9b21cdf725dd5ea8882221356779926b6
Log: Fixed bug #78989
Previous Comments:
------------------------------------------------------------------------
[2020-01-27 21:06:55] nikic@php.net
Related To: Bug #79179
------------------------------------------------------------------------
[2019-12-18 09:48:24] nikic@php.net
Description:
------------
Delayed variance checks may crash when traits are involved. I believe this is because we keep around
a zend_function pointer to a zend_function that only exists temporarily.
Test script:
---------------
<?php
class X {
function method($a): T {}
}
trait T {
function method($r): B {}
}
class U extends X {
use T;
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78989&edit=1
Thread (2 messages)