From: kevin at littletrader dot net
Operating system: Linux
PHP version: 5.1.5CVS
PHP Bug Type: SPL related
Bug description: Segfault
Description:
------------
Segfault:
[Thu Jun 22 18:34:02 2006] [notice] child pid 6222 exit signal
Segmentation fault (11)
Reproduce code:
---------------
<?php
$sql = "SELECT * FROM news ORDER BY nid DESC LIMIT 1";
try{
$dbh = new PDO("mysql:host=$dbhost;dbname=$dbname", $username,
$password);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $dbh->prepare($sql);
$stmt->execute();
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
$it = new IteratorIterator($stmt);
foreach($it as $resultSet)
{
echo $resultSet->key();
}
}
catch(PDOException $e)
{
echo 'Unable to select latest record'.$e->getMessage();
}
?>
Actual result:
--------------
[Thu Jun 22 18:34:02 2006] [notice] child pid 6222 exit signal
Segmentation fault (11)
--
Edit bug report at http://bugs.php.net/?id=37889&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=37889&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=37889&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=37889&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37889&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=37889&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37889&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37889&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37889&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37889&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37889&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=37889&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=37889&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37889&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37889&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37889&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37889&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37889&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37889&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37889&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37889&r=mysqlcfg