X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; q=dns; s=default; b=RD kVMCPzk1GPYhttiMcTT9Vxl968KQaOpgwOArhJIu4GTgOK3exYSPZa6t2PWTk28Z Mj55a1+OnmtMgc0DqoitDRLmm0EmWkiDMH1cS1n+uMPluUHtMrAU4lIm9VMcgAnH W7MFu+JRq0d3f+3pIeE0vEztEfIWOV0U+kxyYlo9k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; s=default; bh=/60ldAkB sCAFzPTUmZVW6PbeemQ=; b=G2bka/ijiv5nDK1OgIjdc66JUAdr8VDHBOeQRGfQ u+Dww6uvgIHZ/6h5MZ2jphSl2EI0L9lmhNN6K2ibz2LStl8/0hushBVSvmdapk9B naVEXOc7havMgkSF0vXCGG8J+DcZzTEXhmsX/Sz+van0ttyWON/n2hCSOZjg7BnZ s3s= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f181.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=rhFRIWOm6EA5n5NUgBMpW36o6JjFMXceF2ZFJv0GNsg=; b=kMfyNAWLxszaIkK0yl4Yatyx7kCEDhdZejI9XnLDQ08m82rJdAtQEck4MsYKfMaMmV i5p+RDUMt7Q9y1Rof2OXn590H+ElxrmRBpnGFPC3++dnudZ7RFSQ1Ag8jImFtyyo+Iz+ bNLDXmdlgtLigPtgpDRTzgeVilmyBo9Xkdj9vO5jFR5A4yLshhDdMdmoNAWkmQ3Qrviu iVdeaDcP5nvGSTCAVid3TS6aVE0TKz0ju3kBYFI2yRelFQq4/INY2Tg9Lu+gnL+9Ll9i qmLD3CCxz9MLl04KmfWkPQp1JZ4bA3EJ0ohaCGJkHlZFsk8TusOyy4Ib7vvOW+BTybp1 5ciQ== X-Gm-Message-State: ALoCoQkjV1sartCB5eib55Ga4QWCKhD3XkhK2ZCDwd9gi1qbys+z66YmNcfBAMWxRXZW7yJqDV8m MIME-Version: 1.0 X-Received: by 10.129.86.5 with SMTP id k5mr30687235ywb.156.1439780409712; Sun, 16 Aug 2015 20:00:09 -0700 (PDT) In-Reply-To: <20150805080216.GS17917@calimero.vinschen.de> References: <20150803083634 DOT GE17917 AT calimero DOT vinschen DOT de> <20150803134223 DOT GB18434 AT calimero DOT vinschen DOT de> <20150805080216 DOT GS17917 AT calimero DOT vinschen DOT de> Date: Sun, 16 Aug 2015 20:00:09 -0700 Message-ID: Subject: Re: Seg Fault in strftime From: Michael Enright To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes On Wed, Aug 5, 2015 at 1:02 AM, Corinna Vinschen wrote: > On Aug 3 23:33, Michael Enright wrote: >> On Mon, Aug 3, 2015 at 9:52 AM, Michael Enright wrote: >> > I'm interested in a solution at the libmozjs level >> >> Is there anything I can do to advance a solution in libmozjs? > > You could report the problem upstream, ideally. Since the behaviour > is not restricted to Cygwin (at least glibc and OpenBSD both use the > same way to handle tm_zone/tm_gmtoff in strftime), they should be > interested in a fix. Looking at the upstream source it seems that they (mozilla.org) have done something to allow their configure script to detect tm_zone's presence. If the related configure variable HAVE_TM_ZONE_TM_GMTOFF is defined as a result of configure's testing, then some code is enabled that has the goal of getting those fields populated in the struct tm that is passed to strftime. The steps are to transfer values from the pseudo-tm struct they use to a temporary struct tm, call mktime with that to get a time_t, pass the time_t to localtime_r, and then use the resulting tm_zone and tm_gmtoffset values in the struct tm that they pass to strftime. To me this all means that mozilla.org has the proper code available and machinery to activate it. I think the only reason there's a crash is because this mozilla.org code is not enabled in cygwin's libmozjs185 for some reason. I cloned the git repo that mozilla.org makes available and ran the configure script. I was not able to build from the resulting setup, but I was able to confirm that the HAVE_TM_ZONE_TM_GMTOFF macro is defined. So the mozilla.org configure script does detect the members on current Cygwin headers. Since that is the case the next step is to look specifically at how libmozjs185 is built for distribution within Cygwin. Is there a possibility that the maintainer of Cygwin's library uses hand-modified configure output to get around some problem, and that stuff needs to be tweaked? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple