ID:               35886
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chris at lodesys dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Windows 2000
 PHP Version:      5CVS-2006-01-03 (snap)
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Works perfectly fine here.


Previous Comments:
------------------------------------------------------------------------

[2006-01-03 20:01:56] chris at lodesys dot com

Description:
------------
This one is weird.  For some value of offset & maxlen,
file_get_contents will fail and crash PHP. (I'm running under Apache
1.3.34 and get a Dr. Watson).  The combination may have something to do
with offset + maxlen just above 4096, but even that's not consistant.

Reproduce code:
---------------
$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 3596);  //
WORKS

$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 3597);  //
FAILS

$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 4096);  //
FAILS

$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 4097);  //
WORKS


$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 1000, 4096);  //
FAILS

$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 1000, 4097);  //
WORKS

$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 0, 4096);  //
WORKS

$x = file_get_contents("C:/php/news.txt", FALSE, NULL, 0, 4097);  //
WORKS


Expected result:
----------------
All combinations of offset & maxlen should work as news.txt is 74 KB
long. 

Actual result:
--------------
PHP fails in some instances (see above) with Dr. Watson reporting
"Application exception occurred: App:  (pid=1828)[apache.exe] Exception
number: c0000005 (access violation)"

Using 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35886&edit=1

Reply via email to