php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #249 rand causes apache core dump
Submitted: 1998-04-06 12:09 UTC Modified: 1998-09-22 10:48 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: lexi at togglemedia dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0 Latest CVS OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lexi at togglemedia dot com
New email:
PHP Version: OS:

 

 [1998-04-06 12:09 UTC] lexi at togglemedia dot com
The following bit of code randomly loads one of a small number of pages:

        $timeval = mktime();
        srand($timeval);
        $randval = rand() % $num_files;

        $file = $path . $files[$randval];
        if(is_readable($file))
        {
                $fp = fopen($file, "r");
                $pass = fpassthru($fp);
        }

Sometimes this code crashes apache(1.3b5) and causes the following
error_log message:

[Mon Apr  6 13:12:36 1998] [notice] httpd: caught SIGSEGV, attempting to
dump core in /usr/local/apache

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-09-22 10:48 UTC] zeev
User is no longer able to reproduce the bug, may 
have been fixed in the latest CVS
---
Most probably fixed, and nothing to go on either way...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC