php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79862 Public non-static property in child should take priority over private static
Submitted: 2020-07-15 04:55 UTC Modified: 2020-07-15 10:42 UTC
From: changochen1 at gmail dot com Assigned: nikic (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.4 OS:
Private report: No CVE-ID: None
 [2020-07-15 04:55 UTC] changochen1 at gmail dot com
Description:
------------
LOG:
---
php: /home/yongheng/php_clean/Zend/zend_hash.c:756: zval *_zend_hash_add_or_update_i(HashTable *, zend_string *, zval *, uint32_t): Assertion `(flag & (1<<3)) == 0' failed.
[1]    41947 abort      ~/php_clean/bld/sapi/cli/php -f php_poc39.php
---



Test script:
---------------
<?
class a {
    private static $b ;
    function __construct () {
        $this -> b = 'basemember' ;
    }
}
class c extends a {
    public $b ;
}

new c ;


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-15 10:28 UTC] nikic@php.net
-Status: Open +Status: Verified -PHP Version: 8.0Git-2020-07-15 (Git) +PHP Version: 7.4
 [2020-07-15 10:41 UTC] nikic@php.net
-Summary: Assertion `(flag & (1<<3)) == 0' in _zend_hash_add_or_update_i +Summary: Public property in child class should take priority of private static -Assigned To: +Assigned To: nikic
 [2020-07-15 10:42 UTC] nikic@php.net
-Summary: Public property in child class should take priority of private static +Summary: Public non-static property in child should take priority over private static
 [2020-07-15 13:01 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e8430b592f977a8aaccf13f3213ff0d987388d13
Log: Fixed bug #79862
 [2020-07-15 13:01 UTC] nikic@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC