Bug #70951 [Opn]: Segmentation fault on invalid WSDL cache
Edit report at https://bugs.php.net/bug.php?id=70951&edit=1
ID: 70951
Updated by: nikic@php.net
Reported by: bostjan at teon dot si
Summary: Segmentation fault on invalid WSDL cache
Status: Open
Type: Bug
Package: SOAP related
Operating System: Linux
PHP Version: 5.6.15
Block user comment: N
Private report: N
New Comment:
I'm not able to reproduce the segfault on master.
Previous Comments:
------------------------------------------------------------------------
[2015-11-20 23:19:02] bostjan at teon dot si
Additional info, just figured it out:
That wsdl cache file was left over when migration from 32bit to 64bit CentOS happened. It works on
32bit platforms.
In my opinion this should not produce a segmentation fault, but cache file should be
invalidated+deleted and recreated. Thoughts?
------------------------------------------------------------------------
[2015-11-20 22:57:03] bostjan at teon dot si
Description:
------------
When instantiating SOAP client, if WSDL cache exists and is "inappropriate" (either
corrupted, or sth similar), PHP crashes.
This was tested with:
- php 5.6.15 (remi's CentOS repos)
- php 5.6.13 (custom built)
- php 5.5.9 (ubuntu default)
- php 5.3.3 (centos 6 - I think it was originally created with this one)
Test script:
---------------
git clone https://github.com/bostjan/php-bug-soap-segfault.git
cd php-bug-soap-segfault
./run.sh
/*
* Essentialy what script does:
* 1. runs the soap-client.php for the first time, to create wsdl cache file
* 2. replaces OK cache file with corrupted one
* 3. reruns soap-client.php which now segfaults
*
* Content of soap-client.php:
* ----------------------------------
* <?php
* ini_set('soap.wsdl_cache_enabled', true);
* ini_set('soap.wsdl_cache_dir', __DIR__);
* $soap = new SoapClient ("./services.wsdl");
* echo "no segfault";
* ?>
* ----------------------------------
*/
Expected result:
----------------
### Now the output will be 'no segfault':
no segfault
### Installing 'inappropriate' cache file...done.
### Now there will be segmentation fault:
no segfault
/* Essentially no segmentation fault. */
Actual result:
--------------
### Now the output will be 'no segfault':
no segfault
### Installing 'inappropriate' cache file...done.
### Now there will be segmentation fault:
./run.sh: line 23: 19892 Segmentation fault php ./soap-client.php
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70951&edit=1
Thread (6 messages)