php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43001 crashing
Submitted: 2007-10-16 20:52 UTC Modified: 2007-10-16 21:06 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: kenorb at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2CVS-2007-10-16 (snap) OS: Windows Vista
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: kenorb at gmail dot com
New email:
PHP Version: OS:

 

 [2007-10-16 20:52 UTC] kenorb at gmail dot com
Description:
------------
I'm using some functions like: function_exists, rename_function, eval and custom function for set_handler_error.
I tested on PHP 5.3(snap) and it still crashing.


Reproduce code:
---------------
something like that:
    foreach ($opt_cache_func as $func => $func_hook) {
	if (function_exists($func) && rename_function($func,'org_'.$func)) {
	    if (empty($func_hook) || !is_string($func_hook)) $func_hook = $def_func;
print 'dupa'; exit;
	    $declaration = sprintf('function %s(%s) {%s}',$func,'',"return $func_hook(func_get_args(),'org_'.'$func');");
	    eval($declaration);
	}
    }


Expected result:
----------------
Should not crashing:)

Actual result:
--------------
Type of Analysis Performed   Crash Analysis 
Machine Name   BRONEK-PC 
Operating System   Windows Vista  
Number Of Processors   2 
Process ID   7440 
Process Image   C:\wamp\Apache2\bin\httpd.exe 
System Up-Time   2 day(s) 03:28:01 
Process Up-Time   00:08:32 


Thread 2 - System ID 7904
Entry point   msvcrt!_endthreadex+6f 
Create time   16/10/2007 22:21:17 
Time spent in user mode   0 Days 0:0:0.390 
Time spent in kernel mode   0 Days 0:0:0.452 






Function     Arg 1     Arg 2     Arg 3   Source 
php5ts!zval_ptr_dtor+7     06182000     00000000     0141fa4c    
0x017af430     017af430     00000000     06182000    
php5ts!call_user_function+66     017af430     00000000     06182000    
php5ts!php_error_log+10f9     0141fa90     017c54c8     00e7a0e0    
php5ts!execute+1c5     00001ee0     00000000     301d2b72    




PHP5TS!ZVAL_PTR_DTOR+7WARNING - DebugDiag was not able to locate debug symbols for php5ts.dll, so the information below may be incomplete.



In httpd__PID__7440__Date__10_16_2007__Time_10_29_47PM__414__Second_Chance_Exception_C0000005.dmp the assembly instruction at php5ts!zval_ptr_dtor+7 in C:\wamp\Apache2\bin\php5ts.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000008 on thread 2

Module Information 
Image Name: C:\wamp\Apache2\bin\php5ts.dll   Symbol Type:  Export 
Base address: 0x00de0000   Time Stamp:  Thu Aug 30 13:06:12 2007  
Checksum: 0x00000000   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP Script Interpreter 
ISAPIFilter: False   File Version:  5.2.4.4 
Managed DLL: False   Internal Name:  php5ts.dll 
VB DLL: False   Legal Copyright:  Copyright ? 1997-2007 The PHP Group 
Loaded Image Name:  php5ts.dll   Legal Trademarks:  PHP 
Mapped Image Name:  C:\wamp\Apache2\bin\php5ts.dll   Original filename:  php5ts.dll 
Module name:  php5ts   Private Build:   
Single Threaded:  False   Product Name:  PHP Script Interpreter 
Module Size:  4.86 MBytes   Product Version:  5.2.4 
Symbol File Name:  php5ts.dll   Special Build:  & 
---
Type of Analysis Performed   Crash Analysis 
Machine Name   BRONEK-PC 
Operating System   Windows Vista  
Number Of Processors   2 
Process ID   9236 
Process Image   C:\wamp\Apache2\bin\httpd.exe 
System Up-Time   2 day(s) 03:33:40 
Process Up-Time   00:05:22 


Thread 35 - System ID 1544
Entry point   msvcrt!_endthreadex+6f 
Create time   16/10/2007 22:30:22 
Time spent in user mode   0 Days 0:0:0.374 
Time spent in kernel mode   0 Days 0:0:0.312 






Function     Arg 1     Arg 2     Arg 3   Source 
php5ts!zval_ptr_dtor+7     06152000     00000000     0271fa4c    
0x0175f430     0175f430     00000000     06152000    
php5ts!call_user_function+66     0175f430     00000000     06152000    
php5ts!php_error_log+10f9     0271fa90     017754c8     00e4a0e0    
php5ts!execute+1c5     06151e88     017754c8     017754c8    
php5ts!zend_hash_apply+40     0618e388     00f37b20     017754c8    
php5ts!php_error_log+1046     0271ff88     00000000     56433230    
php5ts!php_error_log+1022     0000001a     0271fd58     0271fdc8    
php5ts!ts_resource_ex+15     00000000     10003593     015fa198    
php5apache2_2+38d8     015fa198     0094bde0     015fa198    
libhttpd!ap_run_handler+21     015fa198     015fa198     015fa198    
libhttpd!ap_invoke_handler+ae     00000000     017a7270     0271ff18    
libhttpd!ap_die+24e     015fa198     00000000     015eabe8    
libhttpd!ap_get_request_note+1c7c     017a7270     017a7270     017a7270    
libhttpd!ap_run_process_connection+21     017a7270     015c2cf8     0271ff60    
libhttpd!ap_process_connection+33     017a7270     015f6188     00000000    
libhttpd!ap_regkey_value_remove+c0c     017a7268     3a4bca54     00000000    
msvcrt!_endthreadex+44     0271ffac     765b3833     01782f48    
msvcrt!_endthreadex+ce     01782f48     0271ffec     77a5a9bd    
kernel32!BaseThreadInitThunk+e     01782f48     0271089c     00000000    
ntdll!_RtlUserThreadStart+23     768c639b     01782f48     00000000    




PHP5TS!ZVAL_PTR_DTOR+7WARNING - DebugDiag was not able to locate debug symbols for php5ts.dll, so the information below may be incomplete.



In httpd__PID__9236__Date__10_16_2007__Time_10_35_40PM__26__Second_Chance_Exception_C0000005.dmp the assembly instruction at php5ts!zval_ptr_dtor+7 in C:\wamp\Apache2\bin\php5ts.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000008 on thread 35

Module Information 
Image Name: C:\wamp\Apache2\bin\php5ts.dll   Symbol Type:  Export 
Base address: 0x00db0000   Time Stamp:  Thu Aug 30 13:06:12 2007  
Checksum: 0x00000000   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP Script Interpreter 
ISAPIFilter: False   File Version:  5.2.4.4 
Managed DLL: False   Internal Name:  php5ts.dll 
VB DLL: False   Legal Copyright:  Copyright ? 1997-2007 The PHP Group 
Loaded Image Name:  php5ts.dll   Legal Trademarks:  PHP 
Mapped Image Name:  C:\wamp\Apache2\bin\php5ts.dll   Original filename:  php5ts.dll 
Module name:  php5ts   Private Build:   
Single Threaded:  False   Product Name:  PHP Script Interpreter 
Module Size:  4.86 MBytes   Product Version:  5.2.4 
Symbol File Name:  php5ts.dll   Special Build:  & 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-16 21:06 UTC] johannes@php.net
Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

rename_function() is part of apd and was made to help you debugging stuff, PHP isn't made for such tricks so they can break from time to time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 06 22:01:31 2024 UTC