Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22505 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60033 invoked by uid 1010); 17 Mar 2006 13:50:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60018 invoked from network); 17 Mar 2006 13:50:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2006 13:50:27 -0000 X-Host-Fingerprint: 216.117.147.250 unknown Linux 2.4/2.6 Received: from ([216.117.147.250:58572] helo=ctindustries.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id DB/66-55982-3AEBA144 for ; Fri, 17 Mar 2006 08:50:27 -0500 Received: from [127.0.0.1] (dsta-aa203.pivot.net [66.186.171.203]) (authenticated bits=0) by ctindustries.net (8.12.8/8.12.8) with ESMTP id k2HCar3w011268; Fri, 17 Mar 2006 07:36:54 -0500 Message-ID: <441AC0A4.3030306@ctindustries.net> Date: Fri, 17 Mar 2006 08:59:00 -0500 User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Wez Furlong CC: Dmitry Stogov , internals@lists.php.net References: <000001c649b6$8668abc0$6e02a8c0@thinkpad> <441AA4FB.9000209@ctindustries.net> <4e89b4260603170533p529a7bcdh92bd0653ad493c01@mail.gmail.com> In-Reply-To: <4e89b4260603170533p529a7bcdh92bd0653ad493c01@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0611-2, 03/17/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV 0.88/1335/Wed Mar 15 23:58:43 2006 on ctindustries.net X-Virus-Status: Clean Subject: Re: [PHP-DEV] Problem with ext/libxml RINIT/RSHUTDOWN From: rrichards@ctindustries.net (Rob Richards) I don't think I made myself clear on the globals. The only situation there would be a problem is if PHP were built threaded and libxml2 were not (which as of 2.5.8 it is built threaded by default). When running threaded, each thread has its own global state, so when modified at request startup/shutdown the global is only changed for that thread, rather than being set at the module startup/shutdown which would set the default values used to initialize the global states of the threads. Rob Wez Furlong wrote: > Sounds like a nasty situation. > I don't think it's possible to sanely restore the handlers at > rshutdown in a threaded build without screwing up the other threads > that are currently executing. > > My suggestion is to not restore the handlers for threaded builds, and > if there is a library sharing/abuse issue, then treat it as an > installation/configuration problem for the person deploying it (eg: > don't do that!). There's not much you can do about that without > rewriting libxml2 to not use globals for the callbacks. :-/ > > >