From:             200800510 at qq dot com
Operating system: centos 4.6 64
PHP version:      5.2.10
PHP Bug Type:     Unknown/Other Function
Bug description:  amfext 0.92 dev cause "Segmentation fault"

Description:
------------
i use amfext 0.92dev in out project, it's running perfect under
windows(windows xp sp3 , php 5.2.6 , mysql 5.0.37, amfext 0.92dev, AMD
64).

but when i use it under centos 4.6 64, it's cause "Segmentation fault".

here is the gdb sessions:

 (gdb) bt
#0  zend_hash_move_forward_ex (ht=Variable "ht" is not available.
) at /dist/src/php-5.2.8/Zend/zend_hash.c:1086
#1  0x0000002a98a24602 in amf3_serialize_array (buf=0x7fbfff9730,
myht=0x2a98e07b88, var_hash=0x7fbfff9770, tsrm_ls=0xacb090) at
/dist/src/php-5.2.8/ext/amfext-0.9.2/amf.c:1834
#2  0x0000002a98a251ab in amf3_serialize_var (buf=0x7fbfff9730,
struc=0x2a98e07210, var_hash=0x7fbfff9770, tsrm_ls=0xacb090) at
/dist/src/php-5.2.8/ext/amfext-0.9.2/amf.c:2027
#3  0x0000002a98a25a39 in amf3_serialize_object_default (buf=0x7fbfff9730,
myht=0x2a95aa0948, className=0x2a98c60f48
"flex.messaging.messages.AcknowledgeMessage", classNameLen=Variable
"classNameLen" is not available.
)
    at /dist/src/php-5.2.8/ext/amfext-0.9.2/amf.c:1051
#4  0x0000002a98a2574f in amf3_serialize_var (buf=0x7fbfff9730,
struc=Variable "struc" is not available.
) at /dist/src/php-5.2.8/ext/amfext-0.9.2/amf.c:1264
#5  0x0000002a98a2726b in zif_amf_encode (ht=Variable "ht" is not
available.
) at /dist/src/php-5.2.8/ext/amfext-0.9.2/amf.c:2475
#6  0x00000000006962a6 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fbfffa810, tsrm_ls=0xacb090) at
/dist/src/php-5.2.8/Zend/zend_vm_execute.h:200
#7  0x00000000006957d6 in execute (op_array=0x2a98cbfad8,
tsrm_ls=0xacb090) at /dist/src/php-5.2.8/Zend/zend_vm_execute.h:92
#8  0x0000000000695ae9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fbfffacc0, tsrm_ls=0xacb090) at
/dist/src/php-5.2.8/Zend/zend_vm_execute.h:234
#9  0x00000000006957d6 in execute (op_array=0xcfb5a0, tsrm_ls=0xacb090) at
/dist/src/php-5.2.8/Zend/zend_vm_execute.h:92
#10 0x0000000000695ae9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fbfffca00, tsrm_ls=0xacb090) at
/dist/src/php-5.2.8/Zend/zend_vm_execute.h:234
#11 0x00000000006957d6 in execute (op_array=0x2a95aa83f8,
tsrm_ls=0xacb090) at /dist/src/php-5.2.8/Zend/zend_vm_execute.h:92
#12 0x0000000000695ae9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fbfffd060, tsrm_ls=0xacb090) at
/dist/src/php-5.2.8/Zend/zend_vm_execute.h:234
#13 0x00000000006957d6 in execute (op_array=0x2a95a98050,
tsrm_ls=0xacb090) at /dist/src/php-5.2.8/Zend/zend_vm_execute.h:92
#14 0x0000000000672d39 in zend_execute_scripts (type=8, tsrm_ls=0xacb090,
retval=Variable "retval" is not available.
) at /dist/src/php-5.2.8/Zend/zend.c:1134
#15 0x0000000000627309 in php_execute_script (primary_file=0x7fbffff7f0,
tsrm_ls=0xacb090) at /dist/src/php-5.2.8/main/main.c:2023
#16 0x00000000006fa45a in main (argc=2, argv=0x7fbffff948) at
/dist/src/php-5.2.8/sapi/cli/php_cli.c:1133

Reproduce code:
---------------
all the other codes is with default configuration of AMFPHP 1.9

the content of ServicesManager.php is

<?php
class ServicesManager{
        
        function __construct()
        {}
        function __destruct()
        {}
        
        public function UserGetBaseInfo()
        {
            return array(
                new TestObjA(),
                new TestObjB(),
                new TestObjA(),
                new TestObjA(),
                new TestObjB(),
                new TestObjB(),
                new TestObjB(),
            );
        }
}

class TestObjA
{
    public $name;    
    public $_explicitType = 'TestObjA';
}

class TestObjB
{
    public $id;
    public $_explicitType = 'TestObjB';
}  


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

Reply via email to