php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29843 A pretty segfault in ctype_digit()
Submitted: 2004-08-26 00:08 UTC Modified: 2004-08-26 08:58 UTC
From: guth at fiifo dot u-psud dot fr Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.0.1 OS: Linux (Mandrake 9.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: guth at fiifo dot u-psud dot fr
New email:
PHP Version: OS:

 

 [2004-08-26 00:08 UTC] guth at fiifo dot u-psud dot fr
Description:
------------
Please excuse me for my english, but i am french...

So i found a problem with ctype_digit() function, who seems to crash PHP with a big (or not ?) integer.

Reproduce code:
---------------
<?
$id = 1000000000;
ctype_digit($id);
?>

Expected result:
----------------
A warning or something like that, because $id is an integer, but not a segfault...

Actual result:
--------------
nothing, except a new line in my apache error_log file : 

[Thu Aug 26 00:00:18 2004] [notice] child pid 3877 exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-26 00:12 UTC] kiad at free dot fr
It seems the bug comes from ctype librairy : 
 
#include <ctype.h> 
 
int main(int argc, char ** argv) { 
  int i  = isdigit(1000000000); 
} 
 
$ gcc test.c -o plop 
$ ./plop 
Segmentation fault
 [2004-08-26 02:03 UTC] iliaa@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.


 [2004-08-26 08:58 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
 [2004-08-26 08:58 UTC] derick@php.net
Sorry, wrong button.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 12:01:29 2024 UTC