Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29308 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45562 invoked by uid 1010); 8 May 2007 08:21:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45547 invoked from network); 8 May 2007 08:21:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 May 2007 08:21:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:38553] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/D1-10930-00330464 for ; Tue, 08 May 2007 04:21:22 -0400 Received: (qmail 22193 invoked from network); 8 May 2007 08:21:17 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 8 May 2007 08:21:17 -0000 Message-ID: <46403301.8000905@zend.com> Date: Tue, 08 May 2007 12:21:21 +0400 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: Oliver Block CC: internals@lists.php.net References: <200705080336.11411.lists@block-online.eu> In-Reply-To: <200705080336.11411.lists@block-online.eu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] apache2handler/SIGSEGV with apache2 (prefork) From: antony@zend.com (Antony Dovgal) On 05/08/2007 05:36 AM, Oliver Block wrote: > Hello, > > I am getting a SIGSEGV when compiling php-5.2.2. > > gdb breaks up at the if statement of the following function > > static void php_apache_add_version(apr_pool_t *p) > { > TSRMLS_FETCH(); > if (PG(expose_php)) { > ap_add_version_component(p, "PHP/" PHP_VERSION); > } > } > > It only occurs when --enable-maintainer-zts is used. > > main/php_globals.h: > # define PG(v) TSRMG(core_globals_id, php_core_globals *, v) > extern PHPAPI int core_globals_id; > #else > # define PG(v) (core_globals.v) > extern ZEND_API struct _php_core_globals core_globals; > #endif > > TSRM/TSRM.h > #define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1) > #define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls)) > [TSRM_UNSHUFFLE_RSRC_ID(id)])->element) > > GDB tells me that core_globals_id == 0 which leads to an index of -1 -- if I > interpret the results correctly. Either GDB is wrong or your build is badly broken. core_globals_id is initialized in main/main.c, line 1491 *rsrc_id = TSRM_SHUFFLE_RSRC_ID(id_count++); #define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1) -- Wbr, Antony Dovgal