Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29317 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81330 invoked by uid 1010); 8 May 2007 09:53:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81314 invoked from network); 8 May 2007 09:53:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 May 2007 09:53:08 -0000 Authentication-Results: pb1.pair.com header.from=lists@block-online.eu; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lists@block-online.eu; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain block-online.eu from 81.169.146.162 cause and error) X-PHP-List-Original-Sender: lists@block-online.eu X-Host-Fingerprint: 81.169.146.162 mo-p00-ob.rzone.de Solaris 10 (beta) Received: from [81.169.146.162] ([81.169.146.162:11984] helo=mo-p00-ob.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/66-10930-F7840464 for ; Tue, 08 May 2007 05:53:05 -0400 Received: from ollie.block.home (84.63.169.119) by post.webmailer.de (fruni mo40) (RZmta 5.9) with ESMTP id A01868j487uAA7 ; Tue, 8 May 2007 11:52:59 +0200 (MEST) To: Antony Dovgal Date: Tue, 8 May 2007 11:51:35 +0200 User-Agent: KMail/1.7.1 References: <200705080336.11411.lists@block-online.eu> <46403301.8000905@zend.com> In-Reply-To: <46403301.8000905@zend.com> Cc: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200705081151.36313.lists@block-online.eu> X-RZG-AUTH: jsAgD75E4FZRsMYse5W8COLJ40bV42cELvihCND/Uu2brXmKBiVmHanqmVCa X-RZG-CLASS-ID: mo00 Subject: Re: [PHP-DEV] apache2handler/SIGSEGV with apache2 (prefork) From: lists@block-online.eu (Oliver Block) Hello Tony, according to my backtrace, this line (main/main.c:1491) is not processed. 366 if (PG(expose_php)) { (gdb) p core_globals_id $4 = 0 The backtrace follows: Program received signal SIGSEGV, Segmentation fault. 0x40bb4449 in php_apache_add_version (p=0x80a40a8) at /usr/local/src/php-5.2.2/sapi/apache2handler/sapi_apache2.c:366 366 if (PG(expose_php)) { (gdb) bt full #0 0x40bb4449 in php_apache_add_version (p=0x80a40a8) at /usr/local/src/php-5.2.2/sapi/apache2handler/sapi_apache2.c:366 tsrm_ls = (void ***) 0x83a19b0 #1 0x40bb4537 in php_apache_server_startup (pconf=0x80a40a8, plog=0x80ce150, ptemp=0x80d0158, s=0x80be308) at /usr/local/src/php-5.2.2/sapi/apache2handler/sapi_apache2.c:417 data = (void *) 0x1 userdata_key = 0x40c704e7 "apache2hook_post_config" #2 0x080691fd in ap_run_post_config () No symbol table info available. #3 0x0806f622 in main () No symbol table info available. Regards, Oliver Am Dienstag, 8. Mai 2007 10:21 schrieben Sie: > 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)