File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -3449,8 +3449,16 @@ int zend_jit_script(zend_script *script)
34493449 || JIT_G (trigger ) == ZEND_JIT_ON_HOT_TRACE ) {
34503450 zend_class_entry * ce ;
34513451 zend_op_array * op_array ;
3452+ zval * zv ;
3453+
3454+ ZEND_HASH_MAP_FOREACH_VAL (& script -> class_table , zv ) {
3455+ if (Z_TYPE_P (zv ) == IS_ALIAS_PTR ) {
3456+ continue ;
3457+ }
3458+
3459+ ce = Z_PTR_P (zv );
3460+ ZEND_ASSERT (ce -> type == ZEND_USER_CLASS );
34523461
3453- ZEND_HASH_MAP_FOREACH_PTR (& script -> class_table , ce ) {
34543462 ZEND_HASH_MAP_FOREACH_PTR (& ce -> function_table , op_array ) {
34553463 if (!ZEND_FUNC_INFO (op_array )) {
34563464 void * jit_extension = zend_shared_alloc_get_xlat_entry (op_array -> opcodes );
Original file line number Diff line number Diff line change 1+ --TEST--
2+ GH-18639 (Internal class aliases can break preloading + JIT)
3+ --INI--
4+ opcache.enable=1
5+ opcache.enable_cli=1
6+ opcache.jit=1255
7+ opcache.jit_buffer_size=16M
8+ opcache.preload={PWD}/preload_gh18567.inc
9+ --EXTENSIONS--
10+ opcache
11+ --SKIPIF--
12+ <?php
13+ if (PHP_OS_FAMILY == 'Windows ' ) die ('skip Preloading is not supported on Windows ' );
14+ ?>
15+ --FILE--
16+ <?php
17+ echo "ok \n" ;
18+ ?>
19+ --EXPECT--
20+ ok
You can’t perform that action at this time.
0 commit comments