public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Michael Enright <mike@kmcardiff.com>
To: cygwin@cygwin.com
Subject: Re: Seg Fault in strftime
Date: Mon, 17 Aug 2015 03:00:00 -0000	[thread overview]
Message-ID: <CAOC2fq-FKQWo-HO9Xr9uuvOep2==GBSHz2nf6GZjHjb1Fmo8Hg@mail.gmail.com> (raw)
In-Reply-To: <20150805080216.GS17917@calimero.vinschen.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
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

  reply	other threads:[~2015-08-17  3:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31  0:16 Michael Enright
2015-07-31 12:51 ` Jon TURNEY
2015-07-31 19:50   ` Michael Enright
2015-07-31 23:43     ` Michael Enright
2015-08-01  0:47   ` Michael Enright
2015-08-01 21:47 ` Brian Inglis
2015-08-02  1:47   ` Michael Enright
2015-08-03  3:37     ` Brian Inglis
2015-08-03  8:36     ` Corinna Vinschen
2015-08-03 10:54       ` Michael Enright
2015-08-03 13:42         ` Corinna Vinschen
2015-08-03 15:52           ` Michael Enright
2015-08-04  5:33             ` Michael Enright
2015-08-05  8:02               ` Corinna Vinschen
2015-08-17  3:00                 ` Michael Enright [this message]
2015-08-17  8:11                   ` js185 package problem (was Re: Seg Fault in strftime) Corinna Vinschen
2015-08-24 17:39                     ` Yaakov Selkowitz
2015-08-25 17:17                       ` Michael Enright
2015-08-25 18:27                         ` Yaakov Selkowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOC2fq-FKQWo-HO9Xr9uuvOep2==GBSHz2nf6GZjHjb1Fmo8Hg@mail.gmail.com' \
    --to=mike@kmcardiff.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).