#41888 [NEW]: Segfault when attempting to update PDO LOB column in a stream wrapper

From: Date: Tue, 03 Jul 2007 12:58:52 +0000
Subject: #41888 [NEW]: Segfault when attempting to update PDO LOB column in a stream wrapper
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114610@lists.php.net to get a copy of this message
From:             hans at velum dot net
Operating system: Gentoo Linux
PHP version:      5.2.3
PHP Bug Type:     PDO related
Bug description:  Segfault when attempting to update PDO LOB column in a stream wrapper

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)


-- 
Edit bug report at http://bugs.php.net/?id=41888&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41888&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41888&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41888&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41888&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=41888&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41888&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41888&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41888&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41888&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41888&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=41888&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=41888&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41888&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41888&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41888&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41888&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41888&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41888&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41888&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41888&r=mysqlcfg


Thread (10 messages)

« previous php.bugs (#114610) next »