php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60373 Startup errors with log_errors on cause segfault
Submitted: 2011-11-24 17:42 UTC Modified: 2011-11-25 14:06 UTC
From: cataphract@php.net Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: trunk-SVN-2011-11-24 (SVN) OS: ZTS builds (tested on Win)
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: cataphract@php.net
New email:
PHP Version: OS:

 

 [2011-11-24 17:42 UTC] cataphract@php.net
Description:
------------
In ZTS builds, when log_errors is on and there are startup errors, PHP segfaults.

Test script:
---------------
Load an inexistent extension in php.ini.

Actual result:
--------------
0:000:x86> kP
ChildEBP RetAddr  
00a1e310 0f880c3f php5ts_debug!guess_timezone(
			struct _timelib_tzdb * tzdb = 0x0face790, 
			void *** tsrm_ls = 0x010832a0)+0x2d [c:\users\cataphract_\documents\php-src\ext\date\php_date.c @ 841]
00a1e408 0f8810d5 php5ts_debug!get_timezone_info(
			void *** tsrm_ls = 0x010832a0)+0x4f [c:\users\cataphract_\documents\php-src\ext\date\php_date.c @ 868]
00a1e504 0f829d2c php5ts_debug!php_format_date(
			char * format = 0x0fa759c4 "d-M-Y H:i:s", 
			int format_len = 0n11, 
			long ts = 0n1322156443, 
			int localtime = 0n1, 
			void *** tsrm_ls = 0x010832a0)+0x35 [c:\users\cataphract_\documents\php-src\ext\date\php_date.c @ 1118]
00a1e628 0f82f728 php5ts_debug!php_log_err(
			char * log_message = 0x011e25a0 "PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Users\Cataphract_\Documents\php-src\Debug_TS\php_interbase.dll' - The specified module could not be found... in Unknown on line 0", 
			void *** tsrm_ls = 0x010832a0)+0x11c [c:\users\cataphract_\documents\php-src\main\main.c @ 578]
00a1e7d4 0f694c4d php5ts_debug!php_error_cb(
			int type = 0n32, 
			char * error_filename = 0x0fa61a90 "Unknown", 
			unsigned int error_lineno = 0, 
			char * format = 0x0fa61a30 "%s", 
			char * args = 0x00a1eaa8 "???")+0x5c8 [c:\users\cataphract_\documents\php-src\main\main.c @ 1005]
00a1ea98 0f82a9a5 php5ts_debug!zend_error(
			int type = 0n32, 
			char * format = 0x0fa61a30 "%s")+0x24d [c:\users\cataphract_\documents\php-src\zend\zend.c @ 1082]
00a1ec9c 0f82adf2 php5ts_debug!php_verror(
			char * docref = 0x00000000 "", 
			char * params = 0x0fa618f8 "", 
			int type = 0n32, 
			char * format = 0x0fb0e104 "Unable to load dynamic library '%s' - %s", 
			char * args = 0x00a1edac "???", 
			void *** tsrm_ls = 0x010832a0)+0x8c5 [c:\users\cataphract_\documents\php-src\main\main.c @ 801]
00a1ed94 0f9be474 php5ts_debug!php_error_docref0(
			char * docref = 0x00000000 "", 
			void *** tsrm_ls = 0x010832a0, 
			int type = 0n32, 
			char * format = 0x0fb0e104 "Unable to load dynamic library '%s' - %s")+0x42 [c:\users\cataphract_\documents\php-src\main\main.c @ 813]
00a1eef8 0f83dc11 php5ts_debug!php_load_extension(
			char * filename = 0x011e20f8 "php_interbase.dll", 
			int type = 0n1, 
			int start_now = 0n0, 
			void *** tsrm_ls = 0x010832a0)+0x1d4 [c:\users\cataphract_\documents\php-src\ext\standard\dl.c @ 149]
00a1efdc 0f7fdef6 php5ts_debug!php_load_php_extension_cb(
			void * arg = 0x00f9c218, 
			void *** tsrm_ls = 0x010832a0)+0x31 [c:\users\cataphract_\documents\php-src\main\php_ini.c @ 351]
00a1f0c4 0f83db87 php5ts_debug!zend_llist_apply(
			struct _zend_llist * l = 0x0fb6a818, 
			<function> * func = 0x0f83dbe0, 
			void *** tsrm_ls = 0x010832a0)+0x46 [c:\users\cataphract_\documents\php-src\zend\zend_llist.c @ 193]
00a1f1a4 0f82e3b3 php5ts_debug!php_ini_register_extensions(
			void *** tsrm_ls = 0x010832a0)+0x47 [c:\users\cataphract_\documents\php-src\main\php_ini.c @ 747]
00a1f5f0 0130223e php5ts_debug!php_module_startup(
			struct _sapi_module_struct * sf = 0x0131f008, 
			struct _zend_module_entry * additional_modules = 0x00000000, 
			unsigned int num_additional_modules = 0)+0xc33 [c:\users\cataphract_\documents\php-src\main\main.c @ 2131]
00a1f6d0 01302938 php!php_cli_startup(
			struct _sapi_module_struct * sapi_module = 0x0131f008)+0x2e [c:\users\cataphract_\documents\php-src\sapi\cli\php_cli.c @ 414]
00a1f8b8 0131718f php!main(
			int argc = 0n3, 
			char ** argv = 0x01083140)+0x6b8 [c:\users\cataphract_\documents\php-src\sapi\cli\php_cli.c @ 1336]
00a1f908 01316fbf php!__tmainCRTStartup(void)+0x1bf [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 555]
00a1f910 76d23677 php!mainCRTStartup(void)+0xf [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 371]
WARNING: Stack unwind information not available. Following frames may be wrong.
00a1f91c 77b19f02 kernel32!BaseThreadInitThunk+0x12
00a1f95c 77b19ed5 ntdll32!RtlInitializeExceptionChain+0x63
00a1f974 00000000 ntdll32!RtlInitializeExceptionChain+0x36


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-24 17:43 UTC] cataphract@php.net
-Assigned To: +Assigned To: derick
 [2011-11-25 14:06 UTC] derick@php.net
-Status: Assigned +Status: Closed
 [2011-11-25 14:06 UTC] derick@php.net
This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2011-11-25 14:06 UTC] derick@php.net
Automatic comment from SVN on behalf of derick
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=319823
Log: - Fixed bug #60373 (Startup errors with log_errors on cause segfault).
 [2012-04-18 09:47 UTC] laruence@php.net
Automatic comment on behalf of derick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9e6bf9f3f4a91fbdf6236e64dd0075e393b8d876
Log: - Fixed bug #60373 (Startup errors with log_errors on cause segfault).
 [2012-07-24 23:38 UTC] rasmus@php.net
Automatic comment on behalf of derick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9e6bf9f3f4a91fbdf6236e64dd0075e393b8d876
Log: - Fixed bug #60373 (Startup errors with log_errors on cause segfault).
 [2013-11-17 09:34 UTC] laruence@php.net
Automatic comment on behalf of derick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9e6bf9f3f4a91fbdf6236e64dd0075e393b8d876
Log: - Fixed bug #60373 (Startup errors with log_errors on cause segfault).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC