Tonight I wanted to do some benchmarks with PHP 4.3.11, PHP 5.0.4, and
 the three (CALL, GOTO, SWITCH) executors of PHP 5.1 with both GCC 3.4.4
 and GCC 4.0.1 to get a feeling for the improvements in the VM for
 PHP 5.1.

 Both the CALL and SWITCH executors segfault for me on my Linux system
 when running the ZendEngine2/bench.php script.

 Below is the backtrace for the GOTO executor:

(gdb) r Zend/bench.php
Starting program: /usr/local/src/php/php-5.1/sapi/cli/php Zend/bench.php
simple             0.294
simplecall         0.778
simpleucall        1.147
simpleudcall       1.379
mandel             1.223
mandel2            1.494

Program received signal SIGSEGV, Segmentation fault.
execute (op_array=0x826ffe0) at zend_vm_execute.h:3834
3834            memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var);
(gdb) bt
#0  execute (op_array=0x826ffe0) at zend_vm_execute.h:3834
#1  0x0816d534 in execute (op_array=0x812dcc0) at zend_vm_execute.h:3989
.
.
.
#871 0x0816d534 in execute (op_array=0x8285194) at zend_vm_execute.h:3989
#872 0x0812fa34 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /usr/local/src/php/php-5.1/Zend/zend.c:1077
#873 0x080ecb4d in php_execute_script (primary_file=0xbffff7a0)
    at /usr/local/src/php/php-5.1/main/main.c:1670

#874 0x081d3b4a in main (argc=2, argv=0xbffff874)
    at /usr/local/src/php/php-5.1/sapi/cli/php_cli.c:1036

 Below is the backtrace for the SWITCH executor:

(gdb) r Zend/bench.php
Starting program: /usr/local/src/php/php-5.1/sapi/cli/php Zend/bench.php
simple             0.316
simplecall         0.779
simpleucall        1.170
simpleudcall       1.389
mandel             1.384
mandel2            1.630

Program received signal SIGSEGV, Segmentation fault.
execute (op_array=0x8273fe0) at zend_vm_execute.h:53
53              memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var);
(gdb) bt
#0  execute (op_array=0x8273fe0) at zend_vm_execute.h:53
#1  0x0816f7b8 in execute (op_array=0x812dcc0) at zend_vm_execute.h:211
.
.
.
#875 0x0816f7b8 in execute (op_array=0x8289194) at zend_vm_execute.h:211
#876 0x0812fa34 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/local/src/php/php-5.1/Zend/zend.c:1077
#877 0x080ecb4d in php_execute_script (primary_file=0xbffff7a0) at
/usr/local/src/php/php-5.1/main/main.c:1670
#878 0x081d464a in main (argc=2, argv=0xbffff874) at
/usr/local/src/php/php-5.1/sapi/cli/php_cli.c:1036

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to