Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22499 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86714 invoked by uid 1010); 17 Mar 2006 08:01:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86698 invoked from network); 17 Mar 2006 08:01:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2006 08:01:54 -0000 X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:55253] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 43/70-55982-FEC6A144 for ; Fri, 17 Mar 2006 03:01:52 -0500 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id k2H81nAg026394; Fri, 17 Mar 2006 09:01:49 +0100 Date: Fri, 17 Mar 2006 09:01:31 +0100 (CET) X-X-Sender: derick@localhost To: Al Baker cc: internals In-Reply-To: <1142581137.27319.35.camel@localhost> Message-ID: References: <1142580493.27317.30.camel@localhost> <1142581137.27319.35.camel@localhost> X-Face: "L'&?Ah3MYF@FB4hU'XhNhLB]222(Lbr2Y@F:GE[OO;"F5p>qtFBl|yVVA&D{A(g3[C}mG:199P+5C'v.M/u@Z\![0b:Mv.[l6[uWl' MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] PHP 5.1.2 segfaults in get_timezone_info From: derick@php.net (Derick Rethans) On Fri, 17 Mar 2006, Al Baker wrote: > Ok, I'm not sure what /etc/localtime was but when I copied > over /usr/share/zoneinfo/America/New_York to /etc/localtime the problem > went away and things are working gloriously-well. Now that doesn't make a single bit of sense as the new date support in PHP 5.1 just tries to *avoid* all OS related things. Copying over those file is absolutely not going to have any effect. The timelib_parse_tzfile() function only operates on the built-in library. Please provide a short reproducing script that shows this segfault. if you find one put it in a bugreport at http://bugs.php.net. Derick > On Fri, 2006-03-17 at 02:28 -0500, Al Baker wrote: > > Hi, > > > > We're trying to run php 5.1.2 on Windriver Linux (PPC) -- unsupported I > > know -- and most things appear to be working. However when trying to > > use Smarty (which has calls to date functions for caching), PHP > > segfaults in time(). > > > > Running PHP in GDB shows the trace of failing in memcpy and malloc as > > called from timelib_parse_tzfile (timezone=0x30029008 "", > > tzdb=0x179018c) at ... ext/date/lib/parse_tz.c:91 > > > > The rest of the stack is full of calls to ext/date/php_date.c:319 and > > gdb eventually says Previous frame inner to this frame (corrupt stack?) > > > > Looking at strace, Smarty_Compiler.class.php goes through and eventually > > does time(NULL) = 138027 a couple times and then mmap(NULL, 100667392, > > PROT_READ|PROT_WRITE, MAP_PRIVATE,MAP_ANONYMOUS, -1, 0) = 0x30029000 > > followed by the SIGSEGV @ 0. > > > > Setting date.timezone in php.ini doesn't solve the problem. WindRiver > > keeps its timezone files in /usr/share/zoneinfo > > (e.g. /usr/share/zoneinfo/GMT). There is also a localtime time zone > > file in /etc. > > > > I don't know if this is a php bug, or perhaps pilot-error on my part on > > either WindRiver Linux configuration or cross-compiling PHP. > > > > Thanks, > > Al > > > > -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org