php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41888 Segfault when attempting to update PDO LOB column in a stream wrapper
Submitted: 2007-07-03 12:58 UTC Modified: 2009-08-17 17:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hans at velum dot net Assigned: iliaa (profile)
Status: Closed Package: PDO related
PHP Version: 5.2.4 OS: Gentoo Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hans at velum dot net
New email:
PHP Version: OS:

 

 [2007-07-03 12:58 UTC] hans at velum dot net
Description:
------------
I am trying to use PDO LOB columns with PostgreSQL within a user-defined stream wrapper class.  PDO is correctly handling the LOB with PostgreSQL as stream resources; however, when I attempt to update a LOB column using another stream (e.g. php://temp, php://memory) in my stream_flush() command, I get a segmentation fault.

Reproduce code:
---------------
I was able to create a basic reproduce case; however, it is more than 20 lines of code.

Here is a link to a snippet that creates the stream wrapper and attempts to perform an update:

http://pastebin.com/941246

This consistently segfaults in my environment.

Expected result:
----------------
No segfault.

Actual result:
--------------
Segfault.  I have PHP compiled w/ debug flags; however, the backtrace in this case is very unhelpful.


Program terminated with signal 11, Segmentation fault.
#0  0x0830aabd in _zval_dtor_func ()
(gdb) bt
#0  0x0830aabd in _zval_dtor_func ()
#1  0x082fdf90 in ?? ()
#2  0x0870bf34 in ?? ()
#3  0x085bdec4 in ?? ()
#4  0x00000023 in ?? ()
#5  0x085c0268 in ?? ()
#6  0x00000001 in ?? ()
#7  0x00000001 in ?? ()
#8  0xbf8f0108 in ?? ()
#9  0x082fe146 in _zval_ptr_dtor ()
Backtrace stopped: frame did not save the PC
(gdb)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-06 13:36 UTC] hans at velum dot net
Any update on this ticket?  I just confirmed that this is still segfaulting in latest 5.2.4 PHP release.
 [2007-09-06 13:40 UTC] hans at velum dot net
Note, here is some revised reproduce code (there was a bug in the original code such that it was creating two DB connections): http://pastebin.com/f40fa427d

Thanks!
 [2007-10-01 20:04 UTC] hans at velum dot net
Updating version to reflect that problem is still present in 5.2.4
 [2008-01-14 20:53 UTC] hans at velum dot net
Any idea when this issue might get fixed?  This is a big deal to us, since this bug prevents us from swapping out filesystem-based storage with a db-storage engine.
 [2009-06-16 20:06 UTC] hans at velum dot net
Indeed - this appears to be fixed in latest PHP 5.2.x release.  Thanks!
 [2009-06-16 20:09 UTC] pajoye@php.net
> closed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 11:01:27 2025 UTC