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: 2021-11-21 04:22 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: cmb (profile)
Status: No Feedback Package: PDO_INFORMIX (PECL)
PHP Version: 5.4.23 OS: openSuSE 12.2
Private report: No CVE-ID: None
 [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

Pull Requests

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
 [2021-11-08 11:43 UTC] cmb@php.net
-Status: Assigned +Status: Feedback -Assigned To: vnkbabu +Assigned To: cmb
 [2021-11-08 11:43 UTC] cmb@php.net
Can I assume that this fix has actually been released in the meantime?
 [2021-11-21 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC