Re: WDDX

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: WDDX
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-3355@lists.php.net to get a copy of this message
> It's already implemented. Note though that the code is not extensively tested > and was developed from the elements.c sample in the expat library without > further knowledge of the parser or XML in general. > > It's up to you, if you want to extend it/rewrite it/make it better. I have not > come around to extend the serializer to encode binary strings, for example. > Happy hacking. I'm playing with it and have hit a bug: $a = 1; $b = "abc"; echo wddx_serialize(array($a,$b)); This causes a core dump which looks like this: Program received signal SIGSEGV, Segmentation fault. _php3_hash_get_current_key (ht=0x2, str_index=0xefffe4ec, num_index=0x0) at php3_hash.c:960 960 return HASH_KEY_IS_LONG; (gdb) bt #0 _php3_hash_get_current_key (ht=0x2, str_index=0xefffe4ec, num_index=0x0) at php3_hash.c:960 #1 0xa73d8 in _php3_wddx_struct (ht=0x2c64a8) at functions/wddx.c:164 #2 0xa7d68 in php3_wddx_serialize (ht=0x2c6460, return_value=0x208520, list=0x220b70, plist=0x225300) at functions/wddx.c:364 #3 0xaf6f0 in phpparse () at control_structures_inline.h:930 #4 0x6b814 in php3_parse (yyin=0x221000) at main.c:1474 #5 0x6bb20 in apache_php3_module_main (r=0x25eb50, fd=2262016, display_source_mode=0, preprocessed=0) at main.c:1854 #6 0x68968 in send_php3 () #7 0x689f8 in send_parsed_php3 () #8 0xbf44c in ap_invoke_handler () #9 0xda3b0 in process_request_internal () #10 0xda430 in ap_process_request () #11 0xced64 in child_main () #12 0xcefcc in make_child () #13 0xcf1c8 in startup_children () #14 0xcfa9c in standalone_main () #15 0xd05ec in main () Changing it to wddx_serialize($a) doesn't help. Do you have a test script you are using? The core dump itself doesn't make much sense to me being on the return line in php3_hash.c (line 960). -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3355) next »