mailing list of musl libc
 help / color / mirror / code / Atom feed
From: John Mudd <johnbmudd@gmail.com>
To: musl <musl@lists.openwall.com>
Subject: Re: asctime(0) Segmentation fault
Date: Sat, 19 Apr 2014 22:51:34 -0400	[thread overview]
Message-ID: <CAGDMk9GeX5YZqBay4HnfNiepP5QzSfTUrrE-fkpv0RUuyC_7_g@mail.gmail.com> (raw)
In-Reply-To: <CAGDMk9GJm7T+qG8RQ=X5wB5pWi_jsMtwcfBKqFXvym9D==xOjw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

That was incomplete.

From Python-2.7.6/Lib/test/test_time.py:

    def test_asctime(self):
        time.asctime(time.gmtime(self.t))
        self.assertRaises(TypeError, time.asctime, 0)
        self.assertRaises(TypeError, time.asctime, ())
        # XXX: Posix compiant asctime should refuse to convert
        # year > 9999, but Linux implementation does not.
        # self.assertRaises(ValueError, time.asctime,
        #                  (12345, 1, 0, 0, 0, 0, 0, 0, 0))
        # XXX: For now, just make sure we don't have a crash:
        try:
            time.asctime((12345, 1, 1, 0, 0, 0, 0, 1, 0))
        except ValueError:
            pass



>>> import time
>>> time.asctime((12345, 1, 1, 0, 0, 0, 0, 1, 0))
'Mon Jan  1 00:00:00 12345\n'
>>>

musl:
>>> import time
>>> time.asctime((12345, 1, 1, 0, 0, 0, 0, 1, 0))
Segmentation fault (core dumped)




On Sat, Apr 19, 2014 at 10:43 PM, John Mudd <johnbmudd@gmail.com> wrote:

> From Python-2.7.6/Lib/test/test_time.py:
>
>
>

[-- Attachment #2: Type: text/html, Size: 1795 bytes --]

  reply	other threads:[~2014-04-20  2:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-19 22:16 John Mudd
2014-04-19 22:36 ` Jens Gustedt
2014-04-19 22:46 ` John Mudd
2014-04-20  1:43   ` Szabolcs Nagy
2014-04-20  1:59     ` Rich Felker
2014-04-20  2:43   ` John Mudd
2014-04-20  2:51     ` John Mudd [this message]
2014-04-20  3:15       ` Rich Felker
2014-04-20  3:33       ` John Mudd
2014-04-20  3:35         ` Rich Felker

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=CAGDMk9GeX5YZqBay4HnfNiepP5QzSfTUrrE-fkpv0RUuyC_7_g@mail.gmail.com \
    --to=johnbmudd@gmail.com \
    --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).