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, 03 Aug 2015 15:52:00 -0000	[thread overview]
Message-ID: <CAOC2fq_WSgmj1P9NRdOYFCtV1ojNZp=UNwrSyaknq3ZT7s68nA@mail.gmail.com> (raw)
In-Reply-To: <20150803134223.GB18434@calimero.vinschen.de>

On Mon, Aug 3, 2015 at 6:42 AM, Corinna Vinschen  wrote:
> Hang on.  So you suggest that Glibc, Cygwin, as well as any other
> implementation based on the localtime.c code from Arthur David Olson,
> stop using the additional struct members?  Despite them doing the right
> thing where the POSIX implementation is lacking?  Because there's one
> lib you need which doesn't work as expected, rather than rebuilding it
> with a matching fix?  That doesn't sound overly convincing to me.

It's not just one library that I use that has tripped over this. My
brief research into workarounds led me to the glibc guys shrugging off
another project's report. I bet there has been plenty of time spent on
this on the application side that has not left a trail for me to find.

>
> Other than that, you didn't answer the question:  How is a library
> supposed to know that the non-NULL pointer value is just garbage?

I think that is the wrong question. The problem is when there is
nothing telling anyone anything until something crashes. There is
nothing in the official documentation of the API to inform a user that
they must prepare the struct any particular way. There are two ways
the library would not find itself crashing from structs it didn't
like: Not use undocumented members that are pointers that can be
garbage, **OR** tell everyone how to initialize the structs, through
the POSIX spec or through man pages.

>
> I'm firmly with the GLibc guys here...
>

As far as I can tell the Glibc guys did not solve anyone's problem.
I'm interested in a solution at the libmozjs level and I'm interested
in getting struct tm in line with its documentation one way or the
other.

--
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-03 15:52 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 [this message]
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='CAOC2fq_WSgmj1P9NRdOYFCtV1ojNZp=UNwrSyaknq3ZT7s68nA@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).