php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71330 Segmentation fault when Blob column is udpated on a 64bit OS.
Submitted: 2016-01-10 17:23 UTC Modified: -
From: josemalonsom at yahoo dot es Assigned:
Status: Open Package: PDO_INFORMIX (PECL)
PHP Version: Irrelevant OS: Ubuntu 15.10 x86_64
Private report: No CVE-ID: None
 [2016-01-10 17:23 UTC] josemalonsom at yahoo dot es
Description:
------------
When a BLOB column is updated a segmentation fault is arisen. Tested on a 32bit OS and it works fine but fails on a 64bit OS.

PHP: tested in versions 5.4.45, 5.5.30 and 5.6.16.
CSDK: 4.10.FC6DE

Test script:
---------------
// $con is a valid PDO_INFORMIX connection

$con->exec('CREATE TABLE blob_test ( blob_column BLOB )');

$value = "value1";

$stmt = $con->prepare('INSERT INTO blob_test (blob_column) VALUES (?)');
$stmt->bindValue(1, $value, \PDO::PARAM_LOB);
$stmt->execute();

$value = "value2";

$stmt = $con->prepare('UPDATE blob_test set blob_column = ?');
$stmt->bindValue(1, $value, \PDO::PARAM_LOB);
$stmt->execute();

Expected result:
----------------
The Blob column should be updated.

Actual result:
--------------
Program terminated with signal SIGSEGV, Segmentation fault.                                                             
#0  __strcpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:43                                                  
43  ../sysdeps/x86_64/multiarch/strcpy-ssse3.S: No such file or directory.                                   
(gdb) bt                                                                                                                
#0  __strcpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:43                                                  
#1  0x00007f51a562589a in _OdbcCreateLOFds () from /datos1/informix/csdk/lib/cli/libifcli.so                            
#2  0x00007f51a562ad2c in _OdbcExecute () from /datos1/informix/csdk/lib/cli/libifcli.so                                
#3  0x00007f51a5603fa0 in _OdbcExecuteRow () from /datos1/informix/csdk/lib/cli/libifcli.so                             
#4  0x00007f51a5604131 in SQLParamData () from /datos1/informix/csdk/lib/cli/libifcli.so                                
#5  0x00007f51a59596ed in informix_stmt_executer (stmt=0x7f51a5121630) at /home/jose/devel/git-clones/pdo_informix/informix_statement.c:791
#6  0x0000000000667653 in zim_PDOStatement_execute (ht=0, return_value=0x7f51a511f1a0, return_value_ptr=0x7f51ae733218, this_ptr=0x7f51ae76db00, return_value_used=0)
    at /tmp/php-build/source/5.6.16-debug/ext/pdo/pdo_stmt.c:514                                                        
#7  0x00000000008dd8f7 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f51ae733530) at /tmp/php-build/source/5.6.16-debug/Zend/zend_vm_execute.h:558
#8  0x00000000008de0ca in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x7f51ae733530) at /tmp/php-build/source/5.6.16-debug/Zend/zend_vm_execute.h:693
#9  0x00000000008dcf5f in execute_ex (execute_data=0x7f51ae733530) at /tmp/php-build/source/5.6.16-debug/Zend/zend_vm_execute.h:363
#10 0x00000000008dcfe6 in zend_execute (op_array=0x7f51ae76eae8) at /tmp/php-build/source/5.6.16-debug/Zend/zend_vm_execute.h:388
#11 0x0000000000895a37 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /tmp/php-build/source/5.6.16-debug/Zend/zend.c:1341
#12 0x00000000007f78cd in php_execute_script (primary_file=0x7ffc02f59a30) at /tmp/php-build/source/5.6.16-debug/main/main.c:2597
#13 0x0000000000951958 in do_cli (argc=2, argv=0x28709b0) at /tmp/php-build/source/5.6.16-debug/sapi/cli/php_cli.c:994  
#14 0x0000000000952c9c in main (argc=2, argv=0x28709b0) at /tmp/php-build/source/5.6.16-debug/sapi/cli/php_cli.c:1378

Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 17:01:32 2024 UTC