This is the mail archive of the
mailing list for the Cygwin project.
Re: Seg Fault in strftime
- From: Michael Enright <mike at kmcardiff dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 16 Aug 2015 20:00:09 -0700
- Subject: Re: Seg Fault in strftime
- Authentication-results: sourceware.org; auth=none
- References: <CAOC2fq9A1DSjy=7Af=wVCkNEsttpd4Fj-0w_nNwnSb76WFt5WA at mail dot gmail dot com> <loom dot 20150801T233913-448 at post dot gmane dot org> <CAOC2fq9Uv77EuBDBP=Eywht4DqmZZm05WPhnp4dU1V7cD+CE_g at mail dot gmail dot com> <20150803083634 dot GE17917 at calimero dot vinschen dot de> <CAOC2fq-xQh8ThcvJBOMkWMfz0Y7b7FnhuHgBLaLSufLQY4qXGA at mail dot gmail dot com> <20150803134223 dot GB18434 at calimero dot vinschen dot de> <CAOC2fq_WSgmj1P9NRdOYFCtV1ojNZp=UNwrSyaknq3ZT7s68nA at mail dot gmail dot com> <CAOC2fq-EKSYuY6ujQZcL66J7DUaTp_aDeR7SoYeGjcvK+1f9+g at mail dot gmail dot com> <20150805080216 dot GS17917 at calimero dot vinschen dot de>
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
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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple