Edit report at https://bugs.php.net/bug.php?id=60104&edit=1

 ID:                 60104
 Updated by:         patrickalla...@php.net
 Reported by:        patrickalla...@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] patrickalla...@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] patrickalla...@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] patrickalla...@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] patrickalla...@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] fel...@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

Reply via email to