Bug 118126 - readfile segfaults with filesize of multiples of 4KB
readfile segfaults with filesize of multiples of 4KB
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On: 123095
  Show dependency treegraph
Reported: 2004-03-12 04:12 EST by Pytela, Zdenek
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-25 14:51:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
php+apache2 readfile segfault problem (764 bytes, patch)
2004-03-12 04:14 EST, Pytela, Zdenek
no flags Details | Diff

  None (edit)
Description Pytela, Zdenek 2004-03-12 04:12:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)

Description of problem:
Function readfile() crashes with segfault when sending files with
filesize of multiples of 4KB. This bug is specific to apache2.
Red Hat 9 doesn't suffer with this bug.
This is PHP bug #27037. Please include patch enclosed to the next
cummulative update.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run this code through apache2 and take a look into apache's error_log:

$fl = 4096*4;
$fn = "/tmp/file.tmp";
$fp = fopen ($fn, "wb");
fwrite ($fp,  str_repeat ('x', $fl), $fl);

Web page is not displayed, certainly.

Actual Results:  error_log:
[notice] child pid 12345 exit signal Segmentation fault (11)

Expected Results:  Something in the web page, nothing in the error_log.

Additional info:
Comment 1 Pytela, Zdenek 2004-03-12 04:14:37 EST
Created attachment 98482 [details]
php+apache2 readfile segfault problem
Comment 2 Joe Orton 2004-03-12 05:41:30 EST
Thanks for the report.
Comment 3 Joe Orton 2004-05-25 14:51:43 EDT
Fixed in 4.3.6-1.1 update.

Note You need to log in before you can comment on or make changes to this bug.