Bug #70565 [Dup->Csd]: PDO DBLIB MSSql Segmentaion Fault with Prepared Statements

From: Date: Tue, 13 Sep 2016 13:50:24 +0000
Subject: Bug #70565 [Dup->Csd]: PDO DBLIB MSSql Segmentaion Fault with Prepared Statements
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203997@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70565&edit=1

 ID:                 70565
 User updated by:    reyad dot attiyat at gmail dot com
 Reported by:        reyad dot attiyat at gmail dot com
 Summary:            PDO DBLIB MSSql Segmentaion Fault with Prepared
                     Statements
-Status:             Duplicate
+Status:             Closed
 Type:               Bug
 Package:            PDO DBlib
 Operating System:   Windows 7
 PHP Version:        7.0Git-2015-09-23 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

I have not tested the fix mentioned but am closing the bug to keep the bug list clean.


Previous Comments:
------------------------------------------------------------------------
[2016-09-12 21:26:25] adambaratz@php.net

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Yes, this was fixed with #71943.

------------------------------------------------------------------------
[2016-04-29 13:34:45] phofstetter at sensational dot ch

This is very likely a duplicate of #71943 which is fixed in 7.0.6

------------------------------------------------------------------------
[2015-11-19 23:44:51] maxiwheat at gmail dot com

Well, I wrote too fast, we're still having issues with this, even with the patch :-/

------------------------------------------------------------------------
[2015-11-19 20:18:07] maxiwheat at gmail dot com

We have the same issue here. The code works perfectly with PHP 5.6 but in PHP 7 it breaks. What do
something like that :

- Create PDO object
- Make a prepared statement (EXEC a Stored Proc with 16 parameters)
- Bind params with ->bindValue
- Execute (returns data correctly)
- Make an other prepared statement (EXEC same Stored Proc, I know I could reuse the same statement,
but I've been able to produce this bug that way)
- Bind params with ->bindValue
- Execute (it crashes, sometimes segfault, sometimes the query gets truncated and fails on SQL
Server)

The provided patch fix this bug

------------------------------------------------------------------------
[2015-11-17 14:29:35] phofstetter at sensational dot ch

I can confirm that this problem also exists on OSX with FreeTDS 0.95.21 and I can also confirm that
the attached patch solves the crash.

Also, the backtraces in lldb are all over the place depending on how the PHP code looks, but the
crash is always in emalloc().

------------------------------------------------------------------------


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=70565


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


Thread (10 messages)

« previous php.bugs (#203997) next »