php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36420 segfault when access result->num_rows after calling result->close()
Submitted: 2006-02-16 16:32 UTC Modified: 2006-02-16 17:05 UTC
From: grikdotnet at aim dot com Assigned:
Status: Closed Package: MySQLi related
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID:
 [2006-02-16 16:32 UTC] grikdotnet at aim dot com
Description:
------------
I think, the bug #29656 (closed for 5.0.1) persists in 5.1.2

Segfault when trying to access 
$result->num_rows
after calling $result->close() method

Reproduce code:
---------------
<?php
$mysqli = new mysqli('localhost','user','pass','db');
$result = $mysqli->query('select 1');

$result->close();
echo $result->num_rows;

$mysqli->close();

?>

Expected result:
----------------
1

Actual result:
--------------
segmentation fault

I can post backtrace a bit later when recompile PHP with debugging if required.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-16 17:05 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.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Mon Apr 21 07:02:06 2014 UTC