jvlad wrote:
>> Hi,
>>
>> Thanks.  The line in question is the first line of the generated
>> (non-phar) phar.php script which is the foreach line in:
>>
>> <?php
>> foreach (array("SPL", "Reflection", "Phar") as $ext) {
>> if (!extension_loaded($ext)) {
>> echo "$argv[0] requires PHP extension $ext.\n"
>> exit(1);
>> }
>> }
>> ?>
>>
>> Could you try running sapi/cli/php passing in a simple script with those
>> contents and verify you still get the bus error?

Hi,

This is helpful, looks like a real Zend Engine issue, tmp is not being
properly initialized by INIT_ZVAL apparently.  Open a bug report with
those contents, perhaps Dmitry (or someone else equally smart) can take
a look.

Greg

> Core was generated by `./php 1.php'.
> Program terminated with signal 10, Bus error.
> #0  0x002e7d80 in ZEND_FE_RESET_SPEC_TMP_HANDLER (execute_data=0x861cc0)
>     at 
> /export/home/jvlad/php/php5.3-200906221030/Zend/zend_vm_execute.h:5371
> 5371                            INIT_PZVAL_COPY(tmp, array_ptr);
> (gdb) bt
> #0  0x002e7d80 in ZEND_FE_RESET_SPEC_TMP_HANDLER (execute_data=0x861cc0)
>     at 
> /export/home/jvlad/php/php5.3-200906221030/Zend/zend_vm_execute.h:5371
> #1  0x002d92a0 in execute (op_array=0x70bd90)
>     at /export/home/jvlad/php/php5.3-200906221030/Zend/zend_vm_execute.h:104
> #2  0x002b8d48 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
>     at /export/home/jvlad/php/php5.3-200906221030/Zend/zend.c:1188
> #3  0x00266444 in php_execute_script (primary_file=0xffbefbf0)
>     at /export/home/jvlad/php/php5.3-200906221030/main/main.c:2196
> #4  0x003447d4 in main (argc=2, argv=0xffbefcac)
>     at /export/home/jvlad/php/php5.3-200906221030/sapi/cli/php_cli.c:1188
> (gdb) p array_ptr
> $1 = (zval *) 0x861d14
> (gdb) p *array_ptr
> $2 = {value = {lval = 7458416, dval = 1.5848218932638939e-306, str = {val = 
> 0x71ce70 "",
>       len = 0}, ht = 0x71ce70, obj = {handle = 7458416, handlers = 0x0}}, 
> refcount__gc = 0,
>   type = 4 '\004', is_ref__gc = 0 '\0'}
> (gdb) p tmp
> Cannot access memory at address 0xfffffff0
> (gdb) dump_bt executor_globals.current_execute_data
> [0x00861cc0] ??? /export/home/jvlad/php/php5.3-200906221030/sapi/cli/1.php:2
> (gdb)q
> $cat 1.php
> <?php
> foreach (array("SPL", "Reflection", "Phar") as $ext) {
>     if (!extension_loaded($ext)) {
>         echo "$argv[0] requires PHP extension $ext.\n";
>         exit(1);
>     }
> }
> ?> 
> 
> 


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

Reply via email to