Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 19 Apr 2014 22:51:34 -0400
From: John Mudd <johnbmudd@...il.com>
To: musl <musl@...ts.openwall.com>
Subject: Re: asctime(0) Segmentation fault

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@...il.com> wrote:

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

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.