Brian Bernstein <bernie9...@gmail.com> added the comment:

After further investigation, it appears the cause is the ability to overflow 
the datetime object by almost a year.  I've modified the test to demonstrate 
this relative to the current date:

from datetime import date, datetime, timedelta
(datetime.now()-timedelta((date.today()-date(1,1,1)).days+364)).ctime()

It seems the date can be overflowed by up to a year without throwing an 
Exception.  The result of which is a seg fault when calling the bound ctime 
method.

Note that anything above 364 results in OverFlowError.  Below 18 still 
overflows, but does not seg fault, instead resulting in a weird result,e.g.:
'Tue (null) 240 17:25:37 0001'

I'll update the script to demonstrate the edge cases where this occurs.

----------
Added file: http://bugs.python.org/file18910/segfault.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9888>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to