php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73021 SIGSEGV updating a large BLOB field
Submitted: 2016-09-05 16:38 UTC Modified: 2016-09-08 10:59 UTC
From: dorin dot marcoci at gmail dot com Assigned:
Status: Closed Package: PDO Firebird
PHP Version: Irrelevant OS: Debian Linux 8.5
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dorin dot marcoci at gmail dot com
New email:
PHP Version: OS:

 

 [2016-09-05 16:38 UTC] dorin dot marcoci at gmail dot com
Description:
------------
PDO Driver fails when updating a blob field with a large string content.
Our test show SIGSEGV happens from about 92000 chars filled in blob parameter by $Statement->bindValue($Name, $Value);

Some facts:
- Error is raised in Execute, not in BindValue
- Records in database are updated


DB Field is declared as:

Firebird 2.5.5
BLOB SUB_TYPE 1 SEGMENT SIZE 100 CHARACTER SET UTF8 COLLATE UTF8

Script is striped down from our code. Always reproducible.

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

$D = [
	'kind' => 'firebird',
	'host' => '10.10.10.IP',
	'port' => 3050,
	'base' => 'database',
	'charset' => 'utf8',
	'user' => 'SYSDBA',
	'password' => 'password here',
	'options' => []
];

$H = $D['kind'].':host='.$D['host'].';port='.$D['port'].';dbname='.$D['base'].';charset='.$D['charset'];

$C = new \PDO($H, $D['user'], $D['password'], $D['options']);

if (!$S = $C->prepare('update ta_table set description = :description where id = 370'))
	return false;

$S->bindValue('description', str_repeat('a', 100000));

if (!$S->execute())
		return false;

return true;

Actual result:
--------------
[05-Sep-2016 19:33:32] WARNING: [pool www] child 6612 exited on signal 11 (SIGSEGV) after 0.444558 seconds from start

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-08 10:59 UTC] dorin dot marcoci at gmail dot com
-Status: Open +Status: Closed
 [2016-09-08 10:59 UTC] dorin dot marcoci at gmail dot com
Tested on PHP 7.10. The bug is seems to be fixed.
Probably it was at PDO level, not at Firebird driver implementation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC