ID: 44882 Comment by: anomie at users dot sf dot net Reported By: mike at silverorange dot com Status: Open Bug Type: SOAP related Operating System: * PHP Version: 5.2.5 New Comment:
I did a little digging for you PHP devs. What happens here is: 1. Something does a first pass through the soap xml response. 1a. For each node, a zval is allocated. 1b. soap_check_xml_ref saves the pointer to the allocated zval for each node. 2. Sometime after this, all those zvals from the first pass get freed. 3. Something does a second pass through the soap xml response. 3a. For each node, a zval is allocated. If we're lucky, the allocated zval is at the same address as during the first pass and nothing overwrote that memory in the mean time. 3b. soap_check_xml_ref tries to reuse the saved zval pointer for each node. If we got lucky in 3a, it seems to work fine. If we're unlucky, it now uses the wrong zval or something that's not a zval at all. Previous Comments: ------------------------------------------------------------------------ [2008-11-07 16:12:21] anomie at users dot sf dot net Still fails in php5.2-200811071330.tar.bz2. ------------------------------------------------------------------------ [2008-10-21 12:39:09] mike at silverorange dot com The test still fails using the 5.2-200810211030 snapshot. ------------------------------------------------------------------------ [2008-10-21 11:35:05] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2008-10-01 20:27:38] mike at silverorange dot com I've moved the test provided by anomie into a phpt file at http://labs.silverorange.com/files/php-bug44882/. The WSDL file is not included locally as it is the copyrighted work of PayPal. The test passes using the associated patch but fails against the latest snapshot (5.2-200810011830). What else is needed to get this bug fixed? ------------------------------------------------------------------------ [2008-06-23 15:23:14] anomie at users dot sf dot net Here is a test case that illustrates the bug, using the same technique the ext/soap test cases in the PHP distribution use. Please excuse the big block-o-base64, the namespace URIs in the XML were apparently triggering your spam filter. <?php class TestSoapClient extends SoapClient { public function __doRequest($req, $loc, $act, $ver, $oneway){ $data=<<<EOF nZdbd9o4EIDf8ys49BlkQ7IBH0KXOOluzoaEU0i33Zc9ij0k2tgWleQA++s7snzBlxQ3vCRIM99c NRKTj7sw6LyCkIxHF127b3U7EHncZ9HTRfdh9ak36n6cnkyW97NF7/rui3MdvULAN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Fl5kR njYhBseD05MfHwtHPcbZnorVLFEF92Ih+CvDx3ozZPaXdrQkWHWifV0bSloAEg8fIqbA7yQWZa7Q lOoFx3s00Pxmx8f6g62Ui1Wspk1wv41qQ/NwqwjAjCy8eg92m5mNE6+0V1BdHq2ZCPW8K0mUj1W6 dXA/kPwiKJ5Sbe+v7J11VD7J+cGrS7+w8Ccpqf0mnZ78AA== EOF; return gzinflate(base64_decode($data)); } } $client=new TestSoapClient("https://www.paypal.com/wsdl/PayPalSvc.wsdl"); var_dump($client->GetExpressCheckoutDetails(array('GetExpressCheckoutDetailsRequest'=>array('Version'=>50.0,'Token'=>'dummy')))); ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44882 -- Edit this bug report at http://bugs.php.net/?id=44882&edit=1