php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32521 apache2handler accidental crashes caused by SPL
Submitted: 2005-03-31 19:05 UTC Modified: 2005-03-31 19:18 UTC
From: su1d at phpclub dot net Assigned: helly (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5CVS-2005-03-31 (dev) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: su1d at phpclub dot net
New email:
PHP Version: OS:

 

 [2005-03-31 19:05 UTC] su1d at phpclub dot net
Description:
------------
OS: Windows XP Pro (SP1, Eng)
PHP: 5.1-dev 
Apache: 2.0.53

When PHP is installed as Apache's module, the web server sometimes segfaults accidentally.

The call stack backtrace is the following:
php5ts.dll!_estrdup(const char * s=0x00d4b8d8)  Line 400 + 0xf bytes	C
php5ts.dll!zm_activate_spl(int type=11, int module_number=18392672, void * * * tsrm_ls=0x00d4b8a8)  Line 510 + 0x19 bytes	C
php5ts.dll!module_registry_request_startup(_zend_module_entry * module=0x0118a660, void * * * tsrm_ls=0x0533fe10)  Line 1543 + 0x10 bytes	C
php5ts.dll!zend_hash_apply(_hashtable * ht=0x007061c0, int (void *, void * * *)* apply_func=0x0118a660, void * * * tsrm_ls=0x007d9f0a)  Line 664 + 0x7 bytes	C
php5ts.dll!zend_activate_modules(void * * * tsrm_ls=0x0118a660)  Line 793 + 0x14 bytes	C
php5ts.dll!php_request_startup(void * * * tsrm_ls=0x0118a660)  Line 1058	C
php5apache2.dll!php_handler(request_rec * r=0x0065ef40)  Line 534 + 0x8 bytes	C
[...]

Obviously, the crash occurs directly in Zend/zend_alloc.c:400 inside of the function _estrdup() which is in turn called from ext/spl/php_spl.c:510.

That seems to be a Windows specific behaviour, 
so a tiny patch is being proposed to fix the problem.

The patch could be downloaded from 
http://tmp.e-taller.net/php_spl.c-win32.patch


Reproduce code:
---------------
Any PHP application,
i.e. entering to phpMyAdmin always leads to a crash.


Expected result:
----------------
no segfaults

Actual result:
--------------
*oops*


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 19:18 UTC] helly@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 14:01:29 2024 UTC