php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31987 phpinfo() crash PHP when --enable-zend-multibyte is enabled on Win-XP
Submitted: 2005-02-15 16:05 UTC Modified: 2005-02-21 19:35 UTC
From: hirokawa@php.net Assigned: fujimoto (profile)
Status: Closed Package: mbstring related
PHP Version: 5CVS-2005-02-15 (dev) OS: Windows XP PRo SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hirokawa@php.net
New email:
PHP Version: OS:

 

 [2005-02-15 16:05 UTC] hirokawa@php.net
Description:
------------
When ZEND_MULTIBYTE option is defined on Windows XP Pro SP2,
and PHP is compiled as Apache 2 module,
PHP 5.0.x break up by phpinfo().

Here is backtrace by VC6++ for PHP 5.0.4dev,

zif_phpinfo()
 -> php_print_info(-1 TSRMLS_CC);
   -> zend_html_puts(zend_version, 
           strlen(zend_verison TSRMLS_CC)
     -> (L66)
        LANG_SCNG(output_filter)(&filtered, 
           &filtered_len, s, len TSRMLS_CC)

     filtered = 0xcccccccc "";
     &filtered = 0x04fcf54c
     filtered_len = -858993460
     s = "Zend Engine v2.1.0-dev,..."
     len = 66


Reproduce code:
---------------
<?php
 phpinfo();
?>


Expected result:
----------------
php releated info.



Actual result:
--------------
PHP 5.0.4dev executed as Apache 2 module will crash.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-19 09:01 UTC] hirokawa@php.net
Here is a patch to solve this problem,
I don't know if it has any side-effect.

*** Zend/zend_language_scanner.l	13 Feb 2005 13:50:48 -0000	1.120
--- Zend/zend_language_scanner.l	19 Feb 2005 07:42:35 -0000
***************
*** 135,140 ****
--- 135,144 ----
  	SCNG(script_org_size) = 0;
  	SCNG(script_filtered) = NULL;
  	SCNG(script_filtered_size) = 0;
+ 	SCNG(input_filter) = NULL;
+ 	SCNG(output_filter) = NULL;
+ 	SCNG(script_encoding) = NULL;
+ 	SCNG(internal_encoding) = NULL;
  #endif /* ZEND_MULTIBYTE */
  }
 [2005-02-19 15:36 UTC] hirokawa@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 Dec 21 12:01:31 2024 UTC