Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46039 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80898 invoked from network); 13 Nov 2009 10:26:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2009 10:26:40 -0000 Authentication-Results: pb1.pair.com header.from=pierrick@webstart.fr; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pierrick@webstart.fr; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain webstart.fr from 209.85.210.192 cause and error) X-PHP-List-Original-Sender: pierrick@webstart.fr X-Host-Fingerprint: 209.85.210.192 mail-yx0-f192.google.com Received: from [209.85.210.192] ([209.85.210.192:47717] helo=mail-yx0-f192.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/23-60764-0643DFA4 for ; Fri, 13 Nov 2009 05:26:40 -0500 Received: by yxe30 with SMTP id 30so3340796yxe.29 for ; Fri, 13 Nov 2009 02:26:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.75.6 with SMTP id x6mr7415992yba.283.1258107993715; Fri, 13 Nov 2009 02:26:33 -0800 (PST) Date: Fri, 13 Nov 2009 05:26:33 -0500 Message-ID: <16bf97b10911130226x25c16bd9xbe21d33f3937e7e3@mail.gmail.com> To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Patch for bug #49936 From: pierrick@webstart.fr (Pierrick Charron) Hi, I created a patch for the bug #49936. The problem was due to the new way to manage references of stream context. The patch increase the refcount of the context when it's assigned to a stream (in the method php_stream_context_set). A zend_list_delete is already called on the context when the stream is destroyed to do the opposit. There is two different version of the patch. The better one (because it's not using TSRMLS_FETCH) modify the php_stream_context_set which may be used by some of the PECL extensions. And of course the second version of the patch use TSRMLS_FETCH to avoid signature modification. http://www.adoy.net/php/stream-nofetch.diff http://www.adoy.net/php/stream-fetch.diff I also wrote two phpt for this bug : http://www.adoy.net/php/phpt/bug49936-phpt.tgz Thanks for feedbacks. Pierrick