Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29739 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91211 invoked by uid 1010); 25 May 2007 07:51:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91196 invoked from network); 25 May 2007 07:51:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2007 07:51:23 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:40653] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/02-11471-A7596564 for ; Fri, 25 May 2007 03:51:22 -0400 Received: from trainburn-lm-corp-yahoo-com.local (c-24-6-22-164.hsd1.ca.comcast.net [24.6.22.164]) (authenticated bits=0) by mail.lerdorf.com (8.14.1/8.14.1/Debian-4) with ESMTP id l4P7pJ3V006349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2007 00:51:19 -0700 Message-ID: <46569577.3000801@lerdorf.com> Date: Fri, 25 May 2007 00:51:19 -0700 User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: Uwe Schindler CC: "'php-dev List'" References: <509DFE15-F28E-4869-A124-58E6226205A4@prohost.org> <46565A6A.8060504@krug.dk> <000001c79e9f$16441de0$0201a8c0@VEGA> <46569490.3090608@lerdorf.com> In-Reply-To: <46569490.3090608@lerdorf.com> X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------040904080404050004060800" X-Virus-Scanned: ClamAV 0.90.2/3299/Thu May 24 23:41:48 2007 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] PHP 5.2.3RC1 Released From: rasmus@lerdorf.com (Rasmus Lerdorf) --------------040904080404050004060800 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Rasmus Lerdorf wrote: > Uwe Schindler wrote: >> I tried PHP 5.2.3RC1 today and the SunONE webserver using the NSAPI plugin >> crashed in module startups with a segfault. >> >> This happens because rasmus changed tsrm_virtual_cwd.c to use >> get_request_time instead of time() (see changelog of that file). During >> module startup the extension browscap tries to open the browscap.ini file >> and uses the TSRM functions to do that (because TSRM is used in NSAPI). At >> module startup there is unfortunately no request running so the call to the >> SAPI routine sapi_nsapi_get_request_time() core dumps because of a missing >> server_context. >> >> I think that should be fixed because it affects all multithreaded webserver >> SAPIs that supply a get_request_time-function. > > Could you try the attached patch please. It should be a time(0) call there in the ternary, of course. Fixed patch attached. -Rasmus --------------040904080404050004060800 Content-Type: application/macbinary; name="rt.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="rt.diff" PyBydC5kaWZmCj8gc3RyZWFtcy9vCkluZGV4OiBTQVBJLmMKPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1Mg ZmlsZTogL3JlcG9zaXRvcnkvcGhwLXNyYy9tYWluL1NBUEkuYyx2CnJldHJpZXZpbmcgcmV2 aXNpb24gMS4yMDIuMi43LjIuMTMKZGlmZiAtdSAtcjEuMjAyLjIuNy4yLjEzIFNBUEkuYwot LS0gU0FQSS5jCTI1IEFwciAyMDA3IDE0OjE4OjAxIC0wMDAwCTEuMjAyLjIuNy4yLjEzCisr KyBTQVBJLmMJMjUgTWF5IDIwMDcgMDc6NTA6MDYgLTAwMDAKQEAgLTk4NiwxMiArOTg2LDE0 IEBACiAKIFNBUElfQVBJIHRpb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