Bug #46050 [Ver->Csd]: odbc_next_result corrupts prepared resource
Edit report at https://bugs.php.net/bug.php?id=46050&edit=1
ID: 46050
Updated by: cmb@php.net
Reported by: RQuadling at GMail dot com
Summary: odbc_next_result corrupts prepared resource
-Status: Verified
+Status: Closed
Type: Bug
Package: ODBC related
Operating System: Windows XP SP3
PHP Version: 5.3.0alpha2
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=69ba81d183130b06d52ea1cd4574864ffae5dd84
Log: Fix #46050: odbc_next_result corrupts prepared resource
Previous Comments:
------------------------------------------------------------------------
[2020-10-05 15:35:22] cmb@php.net
> [â¦], I doubt this is an issue any more.
Unfortunately, it is. At least there should be no segfault.
Simple reproducer:
<?php
$conn = odbc_connect($dsn, $user, $pass);
$stmt = odbc_prepare($conn, "SELECT 1");
var_dump(odbc_execute($stmt));
var_dump(odbc_fetch_array($stmt));
var_dump(odbc_next_result($stmt));
var_dump(odbc_execute($stmt));
var_dump(odbc_fetch_array($stmt));
?>
------------------------------------------------------------------------
[2015-04-13 18:16:12] RQuadling at GMail dot com
WOW. Old bug. Sorry, but I'm not on Windows with MSSQL anymore.
But if I was, I would probably use pdo_sqlsrv, I doubt this is an issue any more.
------------------------------------------------------------------------
[2015-04-11 14:17:56] cmb@php.net
Does this issue still exist with recent PHP versions?
------------------------------------------------------------------------
[2010-04-26 12:23:10] RQuadling at GMail dot com
As requested. Win32 Backtrace.
php__PID__3656__Date__04_26_2010__Time_11_19_52AM__889__Second_Chance_Exception_C0000005.dmp
Type of Analysis Performed Crash Analysis
Machine Name BV-DEV-SVR-4
Operating System Windows Server 2003 Service Pack 2
Number Of Processors 2
Process ID 3656
Process Image C:\php5\php.exe
System Up-Time 9 day(s) 22:59:24
Process Up-Time 00:00:00
Thread 0 - System ID 2296
Entry point php!mainCRTStartup
Create time 26/04/2010 11:19:52
Time spent in user mode 0 Days 0:0:0.93
Time spent in kernel mode 0 Days 0:0:0.15
Function Arg 1 Arg 2 Arg 3 Source
php5!zif_odbc_exec+31c 01b127e8 00000002 10022c5f
php5!zif_odbc_fetch_array+10 00000001 01b127e8 00000000
php5!execute+cdf 01b40080 01b10108 01b40080
php5!execute+4c25 00c0ec28 00c0fed4 00c0fcbc
php5!execute+1f0 01b10108 00c0fed4 00c0fcb8
php5!zend_execute_scripts+be 00000008 00000000 00000003
php5!php_execute_script+1e2 00c0fed4 0040642c 00000001
php!main+a9a 00000004 003c4fc0 003c3730
php!memcpy+160 00000000 00000000 7ffde000
kernel32!BaseProcessStart+23 00402dda 00000000 00000000
PHP5!ZIF_ODBC_EXEC+31CIn
php__PID__3656__Date__04_26_2010__Time_11_19_52AM__889__Second_Chance_Exception_C0000005.dmp the
assembly instruction at
php5!zif_odbc_exec+31c in C:\php5\php5.dll from The PHP Group has caused an access violation
exception (0xC0000005) when trying to read from memory
location 0x00000028 on thread 0
Module Information
Image Name: C:\php5\php5.dll Symbol Type: PDB
Base address: 0x10000000 Time Stamp: Wed Mar 03 20:45:15 2010
Checksum: 0x00569e17 Comments:
COM DLL: False Company Name: The PHP Group
ISAPIExtension: False File Description: PHP Script Interpreter
ISAPIFilter: False File Version: 5.3.2
Managed DLL: False Internal Name: PHP Script Interpreter
VB DLL: False Legal Copyright: Copyright © 1997-2009 The PHP Group
Loaded Image Name: php5.dll Legal Trademarks: PHP
Mapped Image Name: Original filename: php5.dll
Module name: php5 Private Build:
Single Threaded: False Product Name: PHP
Module Size: 5.50 MBytes Product Version: 5.3.2
Symbol File Name: C:\php5\debug\php5.pdb Special Build: &
------------------------------------------------------------------------
[2010-04-23 23:13:04] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
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=46050
--
Edit this bug report at https://bugs.php.net/bug.php?id=46050&edit=1
Thread (9 messages)