Bug #77340 [Fbk->Opn]: autoload class named with unicode in loop is crashed
| From: | happycock at 163 dot com | Date: | Tue, 25 Dec 2018 13:17:49 +0000 |
| Subject: | Bug #77340 [Fbk->Opn]: autoload class named with unicode in loop is crashed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218614@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77340&edit=1
ID: 77340
User updated by: happycock at 163 dot com
Reported by: happycock at 163 dot com
Summary: autoload class named with unicode in loop is crashed
-Status: Feedback
+Status: Open
Type: Bug
Package: SPL related
Operating System: MacOS Mojave 10.14.2
PHP Version: 7.3.0
Block user comment: N
Private report: N
New Comment:
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x000000010ae6860a php`_emalloc at zend_alloc.c:1287 [opt]
frame #1: 0x000000010ae685dc php`_emalloc [inlined] zend_mm_alloc_heap(heap=0x000000010b800040,
size=<unavailable>) at zend_alloc.c:1358 [opt]
frame #2: 0x000000010ae685a3 php`_emalloc(size=<unavailable>) at zend_alloc.c:2498 [opt]
frame #3: 0x000000010aec353c php`zend_new_interned_string_request [inlined]
zend_string_alloc(len=4, persistent=0) at zend_string.h:133 [opt]
frame #4: 0x000000010aec352e php`zend_new_interned_string_request [inlined]
zend_string_init(str=<unavailable>, len=4, persistent=0) at zend_string.h:155 [opt]
frame #5: 0x000000010aec352e php`zend_new_interned_string_request(str=<unavailable>) at
zend_string.c:241 [opt]
frame #6: 0x000000010ae760e9 php`zend_compile_class_decl(ast=0x000000010b87f090) at
zend_compile.c:6337 [opt]
frame #7: 0x000000010ae78956 php`zend_compile_stmt(ast=0x000000010b87f090) at
zend_compile.c:8236 [opt]
frame #8: 0x000000010ae80180 php`zend_compile_top_stmt(ast=0x000000010b87f090) at
zend_compile.c:8142 [opt]
frame #9: 0x000000010ae8016a php`zend_compile_top_stmt(ast=0x000000010b87f018) at
zend_compile.c:8137 [opt]
frame #10: 0x000000010ae55853 php`zend_compile(type=2) at zend_language_scanner.l:602 [opt]
frame #11: 0x000000010ae5570d php`compile_file(file_handle=0x00007ffee512b7f0, type=8) at
zend_language_scanner.l:636 [opt]
frame #12: 0x000000010ad50e0b php`phar_compile_file(file_handle=0x00007ffee512b7f0, type=8) at
phar.c:3344 [opt]
frame #13: 0x000000010ad8189c php`zif_spl_autoload at php_spl.c:279 [opt]
frame #14: 0x000000010ad81846 php`zif_spl_autoload(execute_data=<unavailable>,
return_value=<unavailable>) at php_spl.c:332 [opt]
frame #15: 0x000000010ae87746 php`zend_call_function(fci=<unavailable>,
fci_cache=<unavailable>) at zend_execute_API.c:770 [opt]
frame #16: 0x000000010ae87ec1 php`zend_lookup_class_ex(name=<unavailable>,
key=0x0000000000000000, use_autoload=<unavailable>) at zend_execute_API.c:926 [opt]
frame #17: 0x000000010ae88572 php`zend_fetch_class(class_name=0x000000010b86c300,
fetch_type=512) at zend_execute_API.c:1339 [opt]
frame #18: 0x000000010af2154a
php`ZEND_FETCH_CLASS_SPEC_UNUSED_CV_HANDLER(execute_data=0x000000010b81f110) at
zend_vm_execute.h:36062 [opt]
frame #19: 0x000000010aede0e8 php`execute_ex(ex=0x000000010b81f110) at zend_vm_execute.h:55287
[opt]
frame #20: 0x000000010aede2a5 php`zend_execute(op_array=0x000000010b87c540,
return_value=0x0000000000000000) at zend_vm_execute.h:60834 [opt]
frame #21: 0x000000010ae97605 php`zend_execute_scripts(type=8, retval=0x0000000000000000,
file_count=3) at zend.c:1568 [opt]
frame #22: 0x000000010ae2e36f php`php_execute_script(primary_file=<unavailable>) at
main.c:2630 [opt]
frame #23: 0x000000010af594f4 php`do_cli(argc=<unavailable>, argv=<unavailable>) at
php_cli.c:997 [opt]
frame #24: 0x000000010af583d8 php`main(argc=2, argv=0x00007ffee512c9c0) at php_cli.c:1389 [opt]
frame #25: 0x00007fff604cced9 libdyld.dylib`start + 1
Previous Comments:
------------------------------------------------------------------------
[2018-12-23 05:19:28] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
I can not reproduce this...
------------------------------------------------------------------------
[2018-12-23 04:24:20] happycock at 163 dot com
Description:
------------
When autoload class named with unicode in loop, the second load is crashed.
Class named with ASCII is ok.
Autoload not in loop is ok.
Test script:
---------------
https://pan.baidu.com/s/1QWAdF7bloa8ZCkuviHmFjQ
ç±»1.php:
<?php class ç±»1{}
ç±»2.php:
<?php class ç±»2{}
t1_crash.php:
<?php
spl_autoload_register();
$array = ["ç±»1", "ç±»2"];
function test($name)
{
echo $name . "\n";
return new $name;
}
foreach ($array as $key => $value) {
test($value);
}
Expected result:
----------------
ç±»1
ç±»2
Actual result:
--------------
ç±»1
ç±»2
Segmentation fault: 11
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77340&edit=1