php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66332 Segmentation fault when calling execute on a statement created by query
Submitted: 2013-12-20 16:28 UTC Modified: 2016-02-07 15:45 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: andreas dot streichardt at 100days dot de Assigned: vnkbabu (profile)
Status: Assigned Package: PDO_INFORMIX (PECL)
PHP Version: 5.4.23 OS: openSuSE 12.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-12-20 16:28 UTC] andreas dot streichardt at 100days dot de
Description:
------------
The extension seems to not check properly in its interns

Test script:
---------------
<?php

$connection = new PDO('informix:host=172.31.5.217;service=sqlexec;database=develop11;server=ifxsrv;EnableScrollableCursors=1;CLIENT_LOCALE=de_de.cp1252;DB_LOCALE=de_de.cp1252;protocol=onsoctcp', 'develop', 'develop');

$stmt = $connection->query('SELECT * FROM kunden');

$stmt->execute(["TEST"]);


Expected result:
----------------
nothing

Actual result:
--------------
Segmentation fault

(gdb) bt
#0  0xb5f7c365 in stmt_parameter_post_execute (stmt=0xb611223c, curr=0xb6111f3c) at /home/develop/PDO_INFORMIX-1.3.1/informix_statement.c:583
#1  0xb5f7cdc2 in informix_stmt_param_hook (stmt=0xb611223c, param=0xb6111f3c, event_type=PDO_PARAM_EVT_EXEC_POST)
    at /home/develop/PDO_INFORMIX-1.3.1/informix_statement.c:947
#2  0x082b6976 in dispatch_param_event (stmt=0xb611223c, event_type=PDO_PARAM_EVT_EXEC_POST) at /home/develop/Downloads/php-5.4.23/ext/pdo/pdo_stmt.c:187
#3  0x082b77d5 in zim_PDOStatement_execute (ht=1, return_value=0xb6117f50, return_value_ptr=0x0, this_ptr=0xb6111ebc, return_value_used=0)
    at /home/develop/Downloads/php-5.4.23/ext/pdo/pdo_stmt.c:531
#4  0x0855e495 in zend_do_fcall_common_helper_SPEC (execute_data=0xb60f2074) at /home/develop/Downloads/php-5.4.23/Zend/zend_vm_execute.h:643
#5  0x0855ea6e in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xb60f2074) at /home/develop/Downloads/php-5.4.23/Zend/zend_vm_execute.h:756
#6  0x0855db7e in execute (op_array=0xb6110d54) at /home/develop/Downloads/php-5.4.23/Zend/zend_vm_execute.h:410
#7  0x0852b1ba in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/develop/Downloads/php-5.4.23/Zend/zend.c:1319
#8  0x084b5056 in php_execute_script (primary_file=0xbfffef54) at /home/develop/Downloads/php-5.4.23/main/main.c:2502
#9  0x085bd098 in do_cli (argc=2, argv=0xbffff1c4) at /home/develop/Downloads/php-5.4.23/sapi/cli/php_cli.c:989
#10 0x085be16e in main (argc=2, argv=0xbffff1c4) at /home/develop/Downloads/php-5.4.23/sapi/cli/php_cli.c:1365


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-08 15:54 UTC] rahulpriyadarshi@php.net
-Assigned To: +Assigned To: rahulpriyadarshi
 [2014-02-08 15:54 UTC] rahulpriyadarshi@php.net
Looking into the issue.
 [2014-02-11 11:27 UTC] rahulpriyadarshi@php.net
I have created a patch for this issue and have committed the changes into SVN branch.

Please give a try to the latest code available at SVN trunk branch and let me know how it works on your environment.
 [2014-02-17 09:59 UTC] andreas dot streichardt at 100days dot de
Works for me :)
 [2016-02-07 15:45 UTC] rahulpriyadarshi@php.net
-Assigned To: rahulpriyadarshi +Assigned To: vnkbabu
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Oct 18 03:01:26 2019 UTC