Bug #60104 [Fbk->Opn]: Segmentation Fault in pdo_sqlite when using sqliteCreateFunction()
| From: | patrickallaert@php.net | Date: | Wed, 02 Nov 2011 18:26:19 +0000 |
| Subject: | Bug #60104 [Fbk->Opn]: Segmentation Fault in pdo_sqlite when using sqliteCreateFunction() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164825@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60104&edit=1
ID: 60104
Updated by: patrickallaert@php.net
Reported by: patrickallaert@php.net
Summary: Segmentation Fault in pdo_sqlite when using
sqliteCreateFunction()
-Status: Feedback
+Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Gentoo Linux
PHP Version: trunk-SVN-2011-10-20 (SVN)
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2011-10-26 09:34:35] patrickallaert@php.net
I have been able to reproduce it without PHPUnit.
I committed ext/pdo_sqlite/tests/bug60104.phpt to make it easier.
------------------------------------------------------------------------
[2011-10-26 09:32:34] patrickallaert@php.net
Automatic comment from SVN on behalf of patrickallaert
Revision: http://svn.php.net/viewvc/?view=revision&revision=318424
Log: Added test for #60104
------------------------------------------------------------------------
[2011-10-21 10:15:16] patrickallaert@php.net
The segfault appears the second time it executes $this->handler-
>sqliteCreateFunction() in the setUp().
If unset() isn't used in tearDown(), then there is no crash.
------------------------------------------------------------------------
[2011-10-21 07:30:03] patrickallaert@php.net
<?php
class SegfaultTest extends PHPUnit_Framework_TestCase
{
protected $handler;
public function setUp()
{
try
{
$this->handler = new PDO( "sqlite::memory:" );
$this->handler->sqliteCreateFunction( 'md5', array(
'ezcQuerySqliteFunctions', 'md5Impl' ), 1 );
}
catch ( PDOException $e )
{
$this->markTestSkipped(
'PDO session could not be created: ' . $e->getMessage()
);
}
}
public function tearDown()
{
unset( $this->handler );
}
public function testOne()
{
}
public function testTwo()
{
}
}
------------------------------------------------------------------------
[2011-10-20 23:55:05] felipe@php.net
Please, paste the test source at somewhere.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=60104
--
Edit this bug report at https://bugs.php.net/bug.php?id=60104&edit=1