From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin@cygwin.com
Cc: mike@kmcardiff.com
Subject: Re: Seg Fault in strftime
Date: Fri, 31 Jul 2015 12:51:00 -0000 [thread overview]
Message-ID: <55BB6F59.8060905@dronecode.org.uk> (raw)
In-Reply-To: <CAOC2fq9A1DSjy=7Af=wVCkNEsttpd4Fj-0w_nNwnSb76WFt5WA@mail.gmail.com>
On 31/07/2015 01:16, Michael Enright wrote:
> The tznam is set from the tmzone member and when this happens that
> member is garbage. This member is garbage POSSIBLY because of a
> configuration option in libmozjs. The calling code is in prmjtime.cpp
> fills in a struct tm from Spidermonkey's own broken-down time
> structure, 'a', and then if the configuration enables, it makes
> *another* struct tm with more fields filled in in order to get
> a.tm_zone's proper value. My guess is that the path is not enabled but
> the bits delivered to me do not disclose whether this righteous code
> path is enabled. __cygwin_gettzname is evidently compiled to expect
> the tm_zone member to exist because GDB shows it does exist.
Thanks for this investigation and analysis.
> So did any aspect of this change recently? The application and library
> were getting along okay before I did cygwin updates. The last time I
> had tried to run this code was early June, at which time I was running
> it dozens of times a day.
[1] looks like a highly relevant change and [2] is the associated discussion
It would be very helpful if you could tweak the testcase there and
produce one which reproduces your problem.
[1]
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=75d5f68aabf62c42884ff935f888b12bbcd00001
[2] https://sourceware.org/ml/newlib/2015/msg00321.html
> Also it appears that the tm_zone member is an extension. I haven't
> been able to find POSIX guidance about how applications are supposed
> use struct tm in compliance in the presence of implementation-defined
> fields. POSIX example code shows a usage that does access the 'at
> least' fields. The language allows for implementation-defined fields.
> No mechanism is provided within POSIX to allow an application to
> discover additional fields and take care of them. It seems to me that
> an application can then assume that when it provides a struct tm as
> input, filling in the time and date reasonably, it is always
> sufficient to fill in the 'at least' fields and the implementation is
> the one who has to assume that the rest of the fields might not be
> filled in.
Yeah, this seems a bit of an under-specified area.
--
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
next prev parent reply other threads:[~2015-07-31 12:51 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 [this message]
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
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=55BB6F59.8060905@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin@cygwin.com \
--cc=mike@kmcardiff.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).