From:             humbads at alum dot mit dot edu
Operating system: Windows XP SP2
PHP version:      5CVS-2005-12-10 (snap)
PHP Bug Type:     ODBC related
Bug description:  access violation on odbc query

Description:
------------
php-cgi.exe crashes with an access violation when using PDO ODBC to run a
simple query as given below.  The code runs without error if not enclosed
in a class.  It also runs without error if the query is run without saving
the return value in $result. The stack trace indicates a crash when
destroying the implicit prepared statement.

Reproduce code:
---------------
$mc = new MyClass;

class MyClass {
  function MyClass() {
    $odbc = new PDO("odbc:Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=C:\\");
                
    $query = "SELECT * FROM invoice";
    $result = $odbc->query($query);
    die("happy");
  }
}

Expected result:
----------------
It should not crash when returning the result, or when running from within
a class.

Actual result:
--------------
>       [EMAIL PROTECTED]()  + 0xb      
        odbc32.dll!CCriticalSection::Enter()  + 0xf     
        [EMAIL PROTECTED]()  + 0xf      
        [EMAIL PROTECTED]()  + 0x23     
        [EMAIL PROTECTED]()  + 0x2b     
        php_pdo_odbc.dll!odbc_stmt_dtor(_pdo_stmt_t * stmt=0x00720448, void * *
* tsrm_ls=0x00323eb0)  Line 56  C
        php_pdo.dll!free_statement(_pdo_stmt_t * stmt=0x00720448, void * * *
tsrm_ls=0x00323eb0)  Line 2118 + 0x8    C
        php_pdo.dll!php_pdo_stmt_delref(_pdo_stmt_t * stmt=0x00720448, void * *
* tsrm_ls=0x00323eb0)  Line 2157 + 0xb  C
        php_pdo.dll!pdo_dbstmt_free_storage(_pdo_stmt_t * stmt=0x00720448, void
* * * tsrm_ls=0x00323eb0)  Line 2162 + 0xf      C
        php5ts.dll!zend_objects_store_free_object_storage(_zend_objects_store *
objects=0x00328dc4, void * * * tsrm_ls=0x00323eb0)  Line 83 + 0xb       C
        php5ts.dll!shutdown_executor(void * * * tsrm_ls=0x00a232c0)  Line 273 +
0x13    C
        [EMAIL PROTECTED]()  + 0x26     

Unhandled exception at 0x7c901010 (ntdll.dll) in php-cgi.exe: 0xC0000005:
Access violation reading location 0x00000018.


-- 
Edit bug report at http://bugs.php.net/?id=35620&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35620&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35620&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35620&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35620&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35620&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35620&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35620&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35620&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35620&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35620&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35620&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35620&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35620&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35620&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35620&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35620&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35620&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35620&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35620&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35620&r=mysqlcfg

Reply via email to