Bug #77849 [Opn->Csd]: Unexpected segfault attempting to use cloned PDO object

From: Date: Fri, 05 Apr 2019 22:57:22 +0000
Subject: Bug #77849 [Opn->Csd]: Unexpected segfault attempting to use cloned PDO object
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220337@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77849&edit=1 ID: 77849 Updated by: krakjoe@php.net Reported by: jordan dot ledoux at gmail dot com Summary: Unexpected segfault attempting to use cloned PDO object -Status: Open +Status: Closed Type: Bug Package: PDO Core Operating System: Ubuntu (AWS AMI) PHP Version: 7.X Block user comment: N Private report: N New Comment: Automatic comment on behalf of porterca@us.ibm.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=9ec1525eb5840f8a38470df65f3a36b43eaf28f0 Log: Fix bug #77849 Disable cloning of PDO handle/connection objects to avoid segfault Previous Comments: ------------------------------------------------------------------------ [2019-04-05 21:59:26] johannes@php.net Since there is no internal API to clone or refcount the dbh a clone can not work without driver API change (and even then it is questionable since we can't really clone the network state) Patch seems fine, except that the test mises a cleanup ------------------------------------------------------------------------ [2019-04-05 19:53:20] camporter1 at gmail dot com Explicitly set clone_obj on PDO dbh objects to NULL to prevent cloning in the attached pull request. However, I'm not sure if there are existing use cases where cloning PDO objects does not segfault? ------------------------------------------------------------------------ [2019-04-05 18:52:59] The following pull request has been associated: Patch Name: [PDO] Disable cloning of PDO handle/connection objects to avoid segfault On GitHub: https://github.com/php/php-src/pull/4011 Patch: https://github.com/php/php-src/pull/4011.patch ------------------------------------------------------------------------ [2019-04-05 18:16:06] jordan dot ledoux at gmail dot com Updated version and package information to reflect reproduced conditions: 7.2.17 -> 7.X PDO MySQL -> PDO Core ------------------------------------------------------------------------ [2019-04-05 06:54:27] jordan dot ledoux at gmail dot com This bug has been reproduced in all versions of 7.X: https://3v4l.org/MRCHQ ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=77849 -- Edit this bug report at https://bugs.php.net/bug.php?id=77849&edit=1

« previous php.bugs (#220337) next »