PHP crashes when executing strval when `precision' setting is very hig
| Bug #54055 | PHP crashes when executing strval when `precision' setting is very hig | ||||
|---|---|---|---|---|---|
| Submitted: | 2011-02-20 13:42 UTC | Modified: | 2011-02-21 07:54 UTC | ||
| From: | mr_platelet+jin6vr at fastmail dot fm | Assigned: | cataphract (profile) | ||
| Status: | Closed | Package: | Reproducible crash | ||
| PHP Version: | 5.3.5 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2011-02-20 13:42 UTC] mr_platelet+jin6vr at fastmail dot fm
Description:
------------
The script below crashes while executing strval.
Test script:
---------------
<?php
for($i = 500; $i <= 1074; $i++) {
ini_set('precision', $i);
print "$i\n";
strval(pow(2, -1074));
}
Expected result:
----------------
I expect all the integers from 500
to 1074 to be printed, each on
a separate line.
Actual result:
--------------
This is the actual output of the script on
my system:
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
Segmentation fault
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2011-02-20 13:49 UTC] mr_platelet+jin6vr at fastmail dot fm
[2011-02-21 07:53 UTC] cataphract@php.net
[2011-02-21 07:54 UTC] cataphract@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cataphract