From:             bugs dot php dot net at majkl578 dot cz
Operating system: Linux & Windows
PHP version:      5.4.7
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Crash when invoking invalid callback

Description:
------------
PHP crashes when the callback (defined as an array) is invalid.

Test script:
---------------
$foo = [
        1 => 0,
        2 => 0,
];

$foo();

Expected result:
----------------
PHP Fatal error

Actual result:
--------------
Segmentation fault; backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000a53ddf in ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER
(execute_data=0x7ffff7f740e8) at
/storage/build/php/5.4/php-5.4.7/Zend/zend_vm_execute.h:1922
1922                            if (Z_TYPE_PP(obj) != IS_STRING && 
Z_TYPE_PP(obj) != IS_OBJECT) {
(gdb) bt
#0  0x0000000000a53ddf in ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER
(execute_data=0x7ffff7f740e8) at
/storage/build/php/5.4/php-5.4.7/Zend/zend_vm_execute.h:1922
#1  0x0000000000a4cb52 in execute (op_array=0x7ffff7fab698) at
/storage/build/php/5.4/php-5.4.7/Zend/zend_vm_execute.h:410
#2  0x0000000000a1064a in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /storage/build/php/5.4/php-5.4.7/Zend/zend.c:1286
#3  0x0000000000987c90 in php_execute_script (primary_file=0x7fffffffdfc0)
at /storage/build/php/5.4/php-5.4.7/main/main.c:2473
#4  0x0000000000b569ea in do_cli (argc=2, argv=0x7fffffffe368) at
/storage/build/php/5.4/php-5.4.7/sapi/cli/php_cli.c:988
#5  0x0000000000b579a5 in main (argc=2, argv=0x7fffffffe368) at
/storage/build/php/5.4/php-5.4.7/sapi/cli/php_cli.c:1364

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63173&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63173&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63173&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63173&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63173&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63173&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63173&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63173&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63173&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63173&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63173&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63173&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63173&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63173&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63173&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63173&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63173&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63173&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63173&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63173&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63173&r=mysqlcfg

Reply via email to