Bug #81091 [NEW]: SIGSEGV (Address boundary error) in zend_mm_alloc_small
| From: | rafal dot janiczek at gmail dot com | Date: | Mon, 31 May 2021 12:39:55 +0000 |
| Subject: | Bug #81091 [NEW]: SIGSEGV (Address boundary error) in zend_mm_alloc_small | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-234106@lists.php.net to get a copy of this message | ||
From: rafal dot janiczek at gmail dot com
Operating system: Linux
PHP version: 7.4.19
Package: Reproducible crash
Bug Type: Bug
Bug description:SIGSEGV (Address boundary error) in zend_mm_alloc_small
Description:
------------
CLI script crash after load ~15 classes via composer (2.0.14). Same with
php8.0.5
vendor/composer/ClassLoader.php:478 includeFile() (just after include
$file)
'php fetcher.one.php mini-virt' terminated by signal SIGSEGV (Address
boundary error)
Actual result:
--------------
#0 zend_mm_alloc_small (bin_num=0, heap=0x7f1157200040) at
./Zend/zend_alloc.c:1255
#1 _emalloc_8 () at ./Zend/zend_alloc.c:2466
#2 0x0000560638d7dd12 in init_op_array
(op_array=op_array@entry=0x7f1157212440, type=type@entry=2 '\002',
initial_ops_size=initial_ops_size@entry=64) at ./Zend/zend_opcode.c:53
#3 0x0000560638d76665 in zend_compile_func_decl (result=0x0,
ast=0x7f1157264810, toplevel=<optimized out>) at
./Zend/zend_compile.c:5992
#4 0x0000560638d755dc in zend_compile_stmt (ast=0x7f1157264810) at
./Zend/zend_compile.c:8550
#5 0x0000560638d7656f in zend_compile_stmt_list
(ast=ast@entry=0x7f1157266288) at ./Zend/zend_compile.c:5271
#6 0x0000560638d755c7 in zend_compile_stmt
(ast=ast@entry=0x7f1157266288) at ./Zend/zend_compile.c:8494
#7 0x0000560638d772f0 in zend_compile_class_decl (ast=0x7f11572664e0,
toplevel=<optimized out>) at ./Zend/zend_compile.c:6482
#8 0x0000560638d78277 in zend_compile_top_stmt (ast=0x7f11572664e0) at
./Zend/zend_compile.c:8469
#9 0x0000560638d782a0 in zend_compile_top_stmt (ast=0x7f1157262018) at
./Zend/zend_compile.c:8458
#10 0x0000560638d4f804 in zend_compile (type=type@entry=2) at
Zend/zend_language_scanner.l:614
#11 0x0000560638d50f6a in compile_file (file_handle=0x7ffeacbb4120,
type=2) at Zend/zend_language_scanner.l:650
#12 0x00007f115496b96d in phar_compile_file (file_handle=0x7ffeacbb4120,
type=2) at ./ext/phar/phar.c:3323
#13 0x0000560638d50fe7 in compile_filename (type=type@entry=2,
filename=filename@entry=0x7f1157213580) at
Zend/zend_language_scanner.l:671
#14 0x0000560638dd5d27 in zend_include_or_eval
(inc_filename=0x7f1157213580, type=2) at ./Zend/zend_execute.c:4299
#15 0x0000560638df2aee in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER () at
./Zend/zend_vm_execute.h:37797
#16 0x0000560638e0a869 in execute_ex (ex=0x7f1157200040) at
./Zend/zend_vm_execute.h:57041
#17 0x0000560638d7b41f in zend_call_function
(fci=fci@entry=0x7ffeacbb4490, fci_cache=0x7f115727f090,
fci_cache@entry=0x7ffeacbb4470) at ./Zend/zend_execute_API.c:820
#18 0x0000560638c85974 in zif_spl_autoload_call (execute_data=<optimized
out>, return_value=<optimized out>) at ./ext/spl/php_spl.c:452
#19 0x0000560638d7b33b in zend_call_function (fci=0x7ffeacbb4630,
fci_cache=0x7ffeacbb4610) at ./Zend/zend_execute_API.c:833
#20 0x0000560638d7b9f5 in zend_lookup_class_ex
(name=name@entry=0x7f11572d3480, key=0x7f11572d35c0,
flags=flags@entry=512) at ./Zend/zend_execute_API.c:1002
#21 0x0000560638d7c243 in zend_fetch_class_by_name
(class_name=0x7f11572d3480, key=<optimized out>,
fetch_type=fetch_type@entry=512) at ./Zend/zend_execute_API.c:1433
#22 0x0000560638defe17 in ZEND_NEW_SPEC_CONST_UNUSED_HANDLER () at
./Zend/zend_vm_execute.h:9255
#23 0x0000560638e0c017 in execute_ex (ex=0x7f1157200040) at
./Zend/zend_vm_execute.h:54651
#24 0x0000560638e13a4b in zend_execute (op_array=0x7f115727e2a0,
return_value=0x0) at ./Zend/zend_vm_execute.h:57993
#25 0x0000560638d8a03c in zend_execute_scripts (type=type@entry=8,
retval=0x7f115727ad60, retval@entry=0x0, file_count=1461793392,
file_count@entry=3) at ./Zend/zend.c:1679
#26 0x0000560638d29810 in php_execute_script (primary_file=<optimized
out>) at ./main/main.c:2621
#27 0x0000560638e15b8a in do_cli (argc=3, argv=0x56063a9cc1d0) at
./sapi/cli/php_cli.c:964
#28 0x0000560638beeed8 in main (argc=3, argv=0x56063a9cc1d0) at
./sapi/cli/php_cli.c:1359
--
Edit bug report at https://bugs.php.net/bug.php?id=81091&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81091&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81091&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81091&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81091&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81091&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81091&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81091&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81091&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81091&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81091&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81091&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81091&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81091&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81091&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81091&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81091&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81091&r=mysqlcfg