Bug #72570 [NEW]: Segmentation fault when binding parameters on a query without placeholders

From: Date: Sun, 10 Jul 2016 11:25:07 +0000
Subject: Bug #72570 [NEW]: Segmentation fault when binding parameters on a query without placeholders
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202170@lists.php.net to get a copy of this message
From:             mbeccati
Operating system: Any
PHP version:      7.0.9RC1
Package:          PDO PgSQL
Bug Type:         Bug
Bug description:Segmentation fault when binding parameters on a query without placeholders

Description:
------------
Running a query without placeholders and binding one or more parameters
results in a segmentation fault.

Since 7.0.8:
https://github.com/php/php-src/commit/66ad4fc393d687f4ca255dd3788529856942bbaa

Test script:
---------------
$db = new PDO("...");
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$stmt = $db->prepare("SELECT 1");
try {
       $stmt->execute([1]);
} catch (PDOException $e) {
       var_dump($e->getCode());
}



Expected result:
----------------
string(5) "08P01"

Actual result:
--------------
Termsig=11


-- 
Edit bug report at https://bugs.php.net/bug.php?id=72570&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=72570&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=72570&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=72570&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=72570&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=72570&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=72570&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=72570&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=72570&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=72570&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=72570&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=72570&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=72570&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=72570&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72570&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=72570&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=72570&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=72570&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72570&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=72570&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=72570&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#202170) next »