Bug #70951 [Opn]: Segmentation fault on invalid WSDL cache

From: Date: Fri, 20 Nov 2015 23:19:04 +0000
Subject: Bug #70951 [Opn]: Segmentation fault on invalid WSDL cache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197358@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70951&edit=1

 ID:                 70951
 User updated by:    bostjan at teon dot si
 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:

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?


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#197358) next »