Bug #79250 [NEW]: PHP7.4+
| From: | KseniMailWOW at gmail dot com | Date: | Mon, 10 Feb 2020 11:21:16 +0000 |
| Subject: | Bug #79250 [NEW]: PHP7.4+ | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-225473@lists.php.net to get a copy of this message | ||
From: KseniMailWOW at gmail dot com
Operating system: All (Windows7+)
PHP version: 7.4.3RC1
Package: Class/Object related
Bug Type: Bug
Bug description:PHP7.4+
Description:
------------
Semple PHP initialization https://pastebin.com/64XuRa4k
Calling zend_declare_property_* results in an empty memory access error
(AV MEMORY READ).
The culprit became empty EG(current_module) In the new procedure
is_persistent_class
(https://github.com/php/php-src/blob/cb7b21009b951d6a08fa948c775c141f6666204c/Zend/zend_API.c#L3474)
Test script:
---------------
zend_class_entry tmp;
INIT_CLASS_ENTRY(tmp, "Hgyjy", NULL);
return zend_register_internal_class(&tmp);
Replacing with, works great!!!!!!!!!!!!!!!!!!!!!!!!
static zend_always_inline zend_bool is_persistent_class(zend_class_entry
*ce) {
return (ce->type & ZEND_INTERNAL_CLASS)
&& (!ce->info.internal.module || ce->info.internal.module->type ==
MODULE_PERSISTENT);
}
OR :
static zend_always_inline zend_bool is_persistent_class(zend_class_entry
*ce) {
return (ce->type & ZEND_INTERNAL_CLASS) && (ce->info.internal.module &&
(ce->info.internal.module->type == MODULE_PERSISTENT));
}
--
Edit bug report at https://bugs.php.net/bug.php?id=79250&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79250&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79250&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79250&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79250&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79250&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79250&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79250&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79250&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79250&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79250&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79250&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79250&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79250&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79250&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79250&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79250&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79250&r=mysqlcfg