php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1910 eval causes core dump with math functions that retun NaN
Submitted: 1999-07-28 15:21 UTC Modified: 1999-07-31 12:25 UTC
From: ccunning at math dot ohio-state dot edu Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0b1 OS: Solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ccunning at math dot ohio-state dot edu
New email:
PHP Version: OS:

 

 [1999-07-28 15:21 UTC] ccunning at math dot ohio-state dot edu
Doing something like eval("\$one = log(-1)"); on Solaris causes a core dump. Doing the log(-1) outside of eval returns NaN. Any function that can return NaN or Infinity with the right argument seems to do this when executed inside an eval. Doing the eval on RedHat 6 with php4 works fine, and PHP3 on Solaris handles it fine. Here is the dbx output as well as some stuff that showed up in the error log.

(dbx) run test.php
Running: php test.php 
(process id 365)
Skipping en_US.so.1, already read
Content-Type: text/html

signal SEGV (no mapping at the fault address) in strlen at 0xef5a4614
0xef5a4614: strlen+0x0080:      ld      [%o1], %o2

-------------------------------------------------------
error_log

[Wed Jul 28 12:13:22 1999] [notice] child pid 26333 exit signal Segmentation Fault (11)
Script:  '/opt/web/htdocs/func.php'
---------------------------------------
math.c(641) : Block 0x0012AC28 status:
Beginning:      Overrun (magic=0x8277DCEF, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
Script:  '/opt/web/htdocs/func.php'
---------------------------------------
zend_variables.c(62) : Block 0x0012AF90 status:
Beginning:      Overrun (magic=0x12F8DCEF, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
Script:  '/opt/web/htdocs/func.php'
---------------------------------------
zend_hash.c(772) : Block 0x0012A230 status:
Beginning:      Overrun (magic=0x8FCC8400, expected=0x7312F8DC)
Beginning:      Overrun (magic=0x8FCC8400, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-31 12:25 UTC] zeev at cvs dot php dot net
Fixed (by two previous fixes)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 08:01:31 2024 UTC