php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4847 php crash Signal SIGFPE/overflow
Submitted: 2000-06-07 00:04 UTC Modified: 2000-06-28 14:40 UTC
From: curt at zirzow dot org Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Beta 4 Patch Level 1 OS: FreeBSD 3.2
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: curt at zirzow dot org
New email:
PHP Version: OS:

 

 [2000-06-07 00:04 UTC] curt at zirzow dot org
<?
$var = 2147483648;

settype($var, 'integer');     // SIGFPE
echo gettype($var).':'.$var;

//-or-

$var = 2147483648;
settype($var, 'string');
settype($var, 'integer');     // now NO SIGFPE
echo gettype($var).':'.$var;  //var == 2147483647

?>

*Note the cast from long I find this error will happen any
time this is done.  there are a few castings like this throughout zend_operator.c.



Program received signal SIGFPE, Arithmetic exception.
0x809cbea in convert_to_long_base (op=0x821358c, base=10)
    at zend_operators.c:203
203                             op->value.lval = (long) op->value.dval;
(gdb) backtrace
#0  0x809cbea in convert_to_long_base (op=0x821358c, base=10)
    at zend_operators.c:203
#1  0x809cb95 in convert_to_long (op=0x821358c) at zend_operators.c:185
#2  0x80c3079 in php_if_settype (ht=2, return_value=0x82135ac, this_ptr=0x0,
    return_value_used=0) at basic_functions.c:1057
#3  0x80f82fd in execute (op_array=0x8211e0c) at ./zend_execute.c:1574
#4  0x8090b29 in php_execute_script (primary_file=0xbfbfd5d0) at main.c:1200
#5  0x80a9c3d in apache_php_module_main (r=0x821a034, fd=30,
    display_source_mode=0) at sapi_apache.c:93
#6  0x808d18e in send_php ()
#7  0x808d1d0 in send_parsed_php ()
#8  0x8117f7b in ap_invoke_handler ()
#9  0x812aa01 in process_request_internal ()
#10 0x812aa60 in ap_process_request ()
#11 0x81224a9 in child_main ()
#12 0x8122634 in make_child ()
#13 0x812278f in startup_children ()
#14 0x8122d40 in standalone_main ()
#15 0x8123593 in main ()
#16 0x8060829 in _start ()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-28 14:40 UTC] andi at cvs dot php dot net
This should be fixed in 4.0.1 due to be released tomorrow. If the problem persists please open a new bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 22:01:32 2024 UTC