From: kenorb at gmail dot com
Operating system: Windows Vista
PHP version: 5.2CVS-2007-10-16 (snap)
PHP Bug Type: Reproducible crash
Bug description: crashing
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: &
--
Edit bug report at http://bugs.php.net/?id=43001&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43001&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43001&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43001&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43001&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43001&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43001&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43001&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43001&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43001&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43001&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43001&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43001&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43001&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43001&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43001&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43001&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43001&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43001&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43001&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43001&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43001&r=mysqlcfg