php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58857 use 0.9.2 dev cause Segmentation fault
Submitted: 2009-09-14 04:27 UTC Modified: 2009-12-15 05:07 UTC
From: 200800510 at qq dot com Assigned:
Status: Closed Package: amfext (PECL)
PHP Version: 5.2.8 OS: centos 4.6 64
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 200800510 at qq dot com
New email:
PHP Version: OS:

 

 [2009-09-14 04:27 UTC] 200800510 at qq dot com
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';
}  



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-16 01:19 UTC] 200800510 at qq dot com
is there any body in?
 [2009-12-15 05:07 UTC] 200800510 at qq dot com
it's a bug of gcc 3.4, not the amfext's. 

use gcc 4.1.2 to complie amfext again, it's ok.

it's resolved by  Kevin AN.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC