Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13368 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7703 invoked by uid 1010); 18 Oct 2004 06:52:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7654 invoked from network); 18 Oct 2004 06:52:39 -0000 Received: from unknown (HELO out2.smtp.messagingengine.com) (66.111.4.26) by pb1.pair.com with SMTP; 18 Oct 2004 06:52:39 -0000 Received: from web1.messagingengine.com (web1.internal [10.202.2.210]) by frontend1.messagingengine.com (Postfix) with ESMTP id 36AFFC3133D; Mon, 18 Oct 2004 02:52:39 -0400 (EDT) Received: by web1.messagingengine.com (Postfix, from userid 99) id 5A48FC61; Mon, 18 Oct 2004 02:52:39 -0400 (EDT) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: <1097215824.21523.206031834@webmail.messagingengine.com> In-Reply-To: <1097215824.21523.206031834@webmail.messagingengine.com> To: "Kamesh Jayachandran" , internals@lists.php.net, zeev@php.net, helly@php.net, andi@php.net Date: Sun, 17 Oct 2004 23:52:39 -0700 X-Sasl-Enc: RWQwn4eeYgIo5dF+YOf2Ww 1098082359 Message-ID: <1098082359.21967.206675358@webmail.messagingengine.com> Subject: Re: [PHP-DEV] why to call php_output_activate(TSRMLS_C) from php_module_startup(reposting first time)(bug #30397) From: kameshj@fastmail.fm ("Kamesh Jayachandran") Can someone respoond to this. With regards Kamesh Jayachandran On Thu, 07 Oct 2004 23:10:24 -0700, "Kamesh Jayachandran" said: > Hi All, > I could see php_output_activate(TSRMLS_C) getting called from > php_module_startup immedeately after php_output_startup. > > Why is this needed? As each SAPI modules call > php_output_activate(TSRMLS_C) explicitly as a part of request startup. > > Why am I concerned about this? > > Ans: php_output_activate(TSRMLS_C) sets > OG(php_body_write) = php_ub_body_write; > which causes calls to php_printf to use php_ub_body_write which depends > on SG(request_info) which is null while php_printf is invoked as part of > apache startup error(Like Invalid extension/ Non existent extension) > logging. > > This causes segmentation fault. > > This change seems to have been introduced in version 1.371 of > main/main.c by Zeev(3 years and 3 months ago). > The comment says, > Fix a major thread safety bug in the output mechanism > @- Fixed a major memory corruption bug in the thread safe version (Zeev) > > > Can I remove a call to php_output_activate(TSRMLS_C) from > php_module_startup? > > PS:What is the use of display_startup_errors? What does display mean > with respect to startup as it might not have any associated request > context? > > With regards > Kamesh Jayachandran > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >