php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27354 Modulus operator crashes PHP
Submitted: 2004-02-22 14:25 UTC Modified: 2004-02-22 14:59 UTC
From: tomas dot matousek at matfyz dot cz Assigned: derick (profile)
Status: Closed Package: Reproducible crash
PHP Version: Irrelevant OS: WinXP
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: tomas dot matousek at matfyz dot cz
New email:
PHP Version: OS:

 

 [2004-02-22 14:25 UTC] tomas dot matousek at matfyz dot cz
Description:
------------
Using modulus operator on particular numbers leads to PHP  crash.

Reproduce code:
---------------
var_dump((-2147483648) % (-1));


Expected result:
----------------
0

Actual result:
--------------
CRASH


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-22 14:35 UTC] derick@php.net
Also gives a floating point error on linux; will fix.
 [2004-02-22 14:59 UTC] derick@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 23:01:29 2024 UTC