mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: musl's asctime catches Python bug
Date: Mon, 4 Sep 2017 20:08:26 -0400	[thread overview]
Message-ID: <20170905000826.GO1627@brightrain.aerifal.cx> (raw)
In-Reply-To: <alpine.DEB.2.00.1709041909160.15642@ny1.eemta.org>

On Mon, Sep 04, 2017 at 07:27:08PM -0400, jacob@welshcomputing.com wrote:
> >I've been working through the Python test suite (2.7.13) on musl
> >(1.1.16). There were a couple over-zealous tests involving errno,
> >and locale tests that I'd expect to fail, but one set of failures
> >I haven't yet been able to rule out as a musl bug.
> 
> There was another bug that I didn't want to mention until Python
> security had a chance to respond: undefined behavior in their
> asctime()/ctime() wrappers for year > 9999, found by virtue of
> musl's use of a_crash to highlight the problem.
> 
> The public discussion is at https://bugs.python.org/issue31339 if
> anyone's interested.

I didn't see a direct link to the fix anywhere, but it's pretty clear
that the right thing to do is call strftime (a clean interface that
lacks global state and thread-safety problems) and/or strftime_l and
never use ctime/asctime.

Rich


      reply	other threads:[~2017-09-05  0:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 20:23 strftime %Z returning empty string jacob
2017-08-31 20:44 ` A. Wilcox
2017-08-31 21:12   ` jacob
2017-08-31 21:56     ` Rich Felker
2017-09-01  8:57   ` Szabolcs Nagy
2017-09-04 23:27 ` musl's asctime catches Python bug jacob
2017-09-05  0:08   ` Rich Felker [this message]

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=20170905000826.GO1627@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).