Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57821 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7699 invoked from network); 13 Feb 2012 09:23:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2012 09:23:22 -0000 Authentication-Results: pb1.pair.com header.from=yoram.b@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yoram.b@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.199.177.89 as permitted sender) X-PHP-List-Original-Sender: yoram.b@zend.com X-Host-Fingerprint: 212.199.177.89 il-mr1.zend.com Received: from [212.199.177.89] ([212.199.177.89:33949] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/23-27081-886D83F4 for ; Mon, 13 Feb 2012 04:23:21 -0500 Received: from il-gw1.zend.com (unknown [10.1.1.22]) by il-mr1.zend.com (Postfix) with ESMTP id B683060781; Mon, 13 Feb 2012 11:21:43 +0200 (IST) Received: from mandor.localnet (10.1.3.58) by il-ex2.zend.net (10.1.1.22) with Microsoft SMTP Server (TLS) id 14.1.255.0; Mon, 13 Feb 2012 11:23:06 +0200 To: Stas Malyshev Date: Mon, 13 Feb 2012 11:23:11 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.37; KDE/4.7.2; i686; ; ) CC: Dmitry Stogov , PHP Internals , Alex Haiut , Zeev Suraski , Eran Ifrah , Lior Kaplan References: <201202121409.54891.yoram.b@zend.com> <201202131056.04017.yoram.b@zend.com> <4F38D19C.3040003@sugarcrm.com> In-Reply-To: <4F38D19C.3040003@sugarcrm.com> X-KMail-Markup: true MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_/ZNOPS6sKoKgtiw" Content-Transfer-Encoding: 7bit Message-ID: <201202131123.11910.yoram.b@zend.com> X-Originating-IP: [10.1.3.58] Subject: Re: [PHP-DEV] Re: restore user opcode handler in PHP From: yoram.b@zend.com (yoram bar haim) --Boundary-01=_/ZNOPS6sKoKgtiw Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi Stas reproduction is indeed easy - just change a static variable (e.q. call zend_set_user_opcode_handler()), then send SIGHUP to apache parent process and check the value in zend_user_opcode_handlers or zend_user_opcodes. it is possible that this problem is related to specific gcc versions but the bottom line is that static initializers occur at first dlpopen but don't re- occur after dlclose()+dlopen(). on linux it behaves ok, unless you have refrence count bug or RTLD_NODELETE on your link flags. however, I also saw this happens on linux once, probably because of glibc bug in specific version. let me return with more detailes about mac. On Monday, February 13, 2012 11:02:20 AM Stas Malyshev wrote: > Hi! > > > Hi Dmitry. > > the patch does work, in sense of actually restoring the handlers state > > when you call zend_set_user_opcode_handler() with original handler. > > the patch does not solve the basic problem of no re-initialization of > > static arrayes on mac. > > Could you please describe in more details what's going on on mac? It > seems strange that dlopen() would not initialize vars - that'd be pretty > bad behavior. Do you have an easy way to reproduce it? --Boundary-01=_/ZNOPS6sKoKgtiw--