Bug #77615 [NEW]: Undefined class constant 'self::DOES_EXIST'
| From: | mberchtold at gmail dot com | Date: | Wed, 13 Feb 2019 19:44:18 +0000 |
| Subject: | Bug #77615 [NEW]: Undefined class constant 'self::DOES_EXIST' | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-219563@lists.php.net to get a copy of this message | ||
From: mberchtold at gmail dot com
Operating system: Windows 10 x64
PHP version: Next Minor Version
Package: Compile Failure
Bug Type: Bug
Bug description:Undefined class constant 'self::DOES_EXIST'
Description:
------------
I'm testing PHP 7.4
(https://windows.php.net/downloads/snaps/ostc/7.4/2019-02-13/) with
preloading on Windows 10. The following exception is thrown and PHP
crashes.
Undefined class constant 'self::DOES_EXIST'
in zend_constants.c
if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) {
zend_throw_error(NULL, "Undefined class constant '%s::%s'",
ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
goto failure;
}
The only reference to DOES_EXIST can be found in this file:
https://github.com/zendframework/zend-validator/blob/master/src/File/NotExists.php
Stack trace:
php7.dll!zend_exception_error(_zend_object * ex, int severity) Line
969 C
php7.dll!zend_error_va_list(int type, const char * format, char *
args) Line 1283 C
php7.dll!zend_error(int type, const char * format, ...) Line 1478 C
php7.dll!zend_throw_error(_zend_class_entry * exception_ce, const char
* format, ...) Line 1516 C
> php7.dll!zend_get_constant_ex(_zend_string * cname, _zend_class_entry
* scope, unsigned int flags) Line 376 C
php7.dll!zend_ast_evaluate(_zval_struct * result, _zend_ast * ast,
_zend_class_entry * scope) Line 505 C
php7.dll!zend_ast_evaluate(_zval_struct * result, _zend_ast * ast,
_zend_class_entry * scope) Line 646 C
php7.dll!zval_update_constant_ex(_zval_struct * p, _zend_class_entry *
scope) Line 614 C
php_opcache.dll!preload_link() Line 3379 C
php_opcache.dll!accel_preload(const char * config) Line 3809 C
[Inline Frame] php_opcache.dll!accel_finish_startup() Line 3992 C
php_opcache.dll!accel_post_startup() Line 2927 C
php7.dll!zend_post_startup() Line 991 C
php7.dll!php_module_startup(_sapi_module_struct * sf,
_zend_module_entry * additional_modules, unsigned int
num_additional_modules) Line 2358 C
php.exe!php_cli_startup(_sapi_module_struct * sapi_module) Line 415 C
php.exe!main(int argc, char * * argv) Line 1351 C
[Inline Frame] php.exe!invoke_main() Line 78 C++
php.exe!__scrt_common_main_seh() Line 288 C++
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
Test script:
---------------
preload zend framework 3 with PHP 7.4 on Windows. Maybe it is enough to
preload this file alone:
https://github.com/zendframework/zend-validator/blob/master/src/File/NotExists.php
Expected result:
----------------
No crash.
Actual result:
--------------
Access violation.
--
Edit bug report at https://bugs.php.net/bug.php?id=77615&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77615&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77615&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77615&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77615&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77615&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77615&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77615&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77615&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77615&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77615&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77615&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77615&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77615&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77615&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77615&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77615&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77615&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77615&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77615&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77615&r=mysqlcfg