Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33584 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1461 invoked by uid 1010); 3 Dec 2007 15:20:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1446 invoked from network); 3 Dec 2007 15:20:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Dec 2007 15:20:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=rachmel@avaya.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rachmel@avaya.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain avaya.com from 198.152.13.100 cause and error) X-PHP-List-Original-Sender: rachmel@avaya.com X-Host-Fingerprint: 198.152.13.100 co300216-co-outbound.net.avaya.com Received: from [198.152.13.100] ([198.152.13.100:48673] helo=co300216-co-outbound.avaya.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/61-25012-BAE14574 for ; Mon, 03 Dec 2007 10:20:18 -0500 X-IronPort-AV: E=Sophos;i="4.23,244,1194238800"; d="scan'208";a="88436631" Received: from unknown (HELO co300216-co-erhwest.avaya.com) ([198.152.7.5]) by co300216-co-outbound.avaya.com with ESMTP; 03 Dec 2007 10:19:57 -0500 X-IronPort-AV: E=Sophos;i="4.23,244,1194238800"; d="scan'208";a="136341931" Received: from unknown (HELO 307622ANEX5.global.avaya.com) ([135.64.140.16]) by co300216-co-erhwest-out.avaya.com with ESMTP; 03 Dec 2007 10:19:16 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 3 Dec 2007 16:19:02 +0100 Message-ID: <11486DD9B957EA488E21C44BC8737EFC594E3B@307622ANEX5.global.avaya.com> In-Reply-To: <11486DD9B957EA488E21C44BC8737EFC594995@307622ANEX5.global.avaya.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] FW: [PHP] PHP 5.2.3 segfault with syslog standard extension Thread-Index: AcgwwGMcPUIv6u/iTC2qN9WNU3jjOQEBSERAAD5hkfA= References: <11486DD9B957EA488E21C44BC8737EFC54A3A4@307622ANEX5.global.avaya.com> <4749854D.4050809@daylessday.org> <11486DD9B957EA488E21C44BC8737EFC54A3CA@307622ANEX5.global.avaya.com> <47498878.1070500@daylessday.org> <11486DD9B957EA488E21C44BC8737EFC56FB8E@307622ANEX5.global.avaya.com> <474BBBD1.2030107@daylessday.org> <11486DD9B957EA488E21C44BC8737EFC594995@307622ANEX5.global.avaya.com> To: "Rachmel, Nir (Nir)" , "Antony Dovgal" Cc: Subject: RE: [PHP-DEV] FW: [PHP] PHP 5.2.3 segfault with syslog standard extension From: rachmel@avaya.com ("Rachmel, Nir (Nir)") Hi, I have been doing some code-reading. Why is the RSHUTDOWN function for syslog ext called only when run under win32? Shouldn't the cleanup happen on linux as well? Another question is for the use of zend_strndup instead of one of the non-persistent memory allocation functions (i.e. estrndup() ) ? There is no use for this variable after the request dies (as far as I understand). However, so far, I can't seem to understand who/what corrupts my memory. What do you think about extending the RINIT function instead of: PHP_RINIT_FUNCTION(syslog) { if (INI_INT("define_syslog_variables")) { start_syslog(TSRMLS_C); } else { BG(syslog_started)=3D0; } return SUCCESS; } To be: PHP_RINIT_FUNCTION(syslog) { if (INI_INT("define_syslog_variables")) { start_syslog(TSRMLS_C); } else { BG(syslog_started)=3D0; BG(syslog_device)=3DNULL; /* This is the addition */ } return SUCCESS; } Thanks in advance, Nir. -----Original Message----- From: Rachmel, Nir (Nir) [mailto:rachmel@avaya.com]=20 Sent: Sunday, December 02, 2007 11:31 AM To: Antony Dovgal Cc: internals@lists.php.net Subject: RE: [PHP-DEV] FW: [PHP] PHP 5.2.3 segfault with syslog standard extension Hi, I tried your advice, and put a breakpoint at the shutdown function. However it never reaches it! (not normally, and not before the SEGV is sent). In case I didn't write it in the previous threads, I am running the PHP scripts from my web-server (appWeb, which is apache like for embedded systems). PHP is compiled as a static module into it, so maybe the shutdown procedure is never called since the PHP is "never shut down"? I would appreciate any advice / ideas you might have, Thanks in advance, Nir. -----Original Message----- From: Antony Dovgal [mailto:tony@daylessday.org] Sent: Tuesday, November 27, 2007 8:40 AM To: Rachmel, Nir (Nir) Cc: internals@lists.php.net Subject: Re: [PHP-DEV] FW: [PHP] PHP 5.2.3 segfault with syslog standard extension On 25.11.2007 19:55, Rachmel, Nir (Nir) wrote: > If it helps, I am attaching the relevant tsrm_ls (according to the=20 > globals_id in the relevant frame): =20 > syslog_started =3D 1, > syslog_device =3D 0x5a5a5a5a
, So it's somehow got freed. Try setting breakpoint to zm_shutdown_syslog() function to see if it was called before. It should be called on shutdown only, but that's the only case when BG(syslog_device) is freed and not NULLed. -- Wbr, Antony Dovgal -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php