From:             cstdenis at ctgameinfo dot com
Operating system: FreeBSD 6.1-RELEASE
PHP version:      5CVS-2006-11-29 (snap)
PHP Bug Type:     Filesystem function related
Bug description:  file_get_contents causes bus error on certain offsets

Description:
------------
Note: this MAY be the same bug as #37866 but it was closed due to lack of
CVS testing and I can not add a comment to it.

May also be related to #35886 but its marked fixed in cvs and win32 only.

Example background
------------------
karin# ll cache/profiles/c/cstdenis.html
-rw-r--r--  1 www  site5  23177 Nov 28 16:54
cache/profiles/c/cstdenis.html

All tests done via CLI. Not tested under apache

Reproduce code:
---------------
Code
----
<?php
echo file_get_contents('cache/profiles/c/cstdenis.html',  false, null,
1399);
?>
outputs contents of file from offset 1399

<?php
echo file_get_contents('cache/profiles/c/cstdenis.html',  false, null,
1400);
?>
Bus error

Expected result:
----------------
File contents from offset

Actual result:
--------------
Bus Error

Backtrace of core
-----------------
#0  0x28588322 in memcpy () from /lib/libc.so.6
[New LWP 100443]
(gdb) bt
#0  0x28588322 in memcpy () from /lib/libc.so.6
Cannot access memory at address 0xbfbfd29c


Latest CVS snap still has the same problem.

Backtrace of 5.2.1-dev core
----------------------------
#0  0x2869c329 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x2869c329 in memcpy () from /lib/libc.so.6
Cannot access memory at address 0xbfbfd25c

-- 
Edit bug report at http://bugs.php.net/?id=39673&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39673&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39673&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39673&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39673&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39673&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39673&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39673&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39673&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39673&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39673&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39673&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39673&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39673&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39673&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39673&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39673&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39673&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39673&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39673&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39673&r=mysqlcfg

Reply via email to