[issue29100] Core dump / OverflowError for datetime.fromtimestamp with overly large timestamp in Ubuntu 12.04

2016-12-28 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +belopolsky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29100] Core dump / OverflowError for datetime.fromtimestamp with overly large timestamp in Ubuntu 12.04

2016-12-28 Thread Donald Stufft

Changes by Donald Stufft :


--
nosy: +dstufft

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29100] Core dump / OverflowError for datetime.fromtimestamp with overly large timestamp in Ubuntu 12.04

2016-12-28 Thread Jordon Phillips

New submission from Jordon Phillips:

In Python 3.6.0 if you give datetime.fromtimestamp a very bad value you either 
get a core dump or an OverflowError. The core dump occurs when no tzinfo is 
provided, the OverflowError occurs when a tzinfo is provided (such as tzlocal 
from dateutil). Attached is a minimal script to reproduce the error. Note that 
this behavior only occurs on certain systems. It does not happen on OSX 
10.11.6, but it does happen on Ubuntu 12.04. I imagine it happens on other 
systems as well, but I haven't tested beyond those two.

Here are the specific errors I get on Ubuntu 12.04. When no tzinfo is provided:

python: 
/tmp/python-build.20161228223921.28011/Python-3.6.0/Modules/_datetimemodule.c:251:
 days_before_year: Assertion `year >= 1' failed.
Aborted (core dumped)

When a tzinfo is provided:

Traceback (most recent call last):
  File "test1.py", line 11, in 
datetime.fromtimestamp(bad_st_mtime, local_time_zone)
  File 
"~/.pyenv/versions/venv36d/lib/python3.6/site-packages/dateutil/tz/_common.py", 
line 210, in fromutc
dt_wall = self._fromutc(dt)
  File 
"~/.pyenv/versions/venv36d/lib/python3.6/site-packages/dateutil/tz/_common.py", 
line 195, in _fromutc
return dt + dtdst
OverflowError: date value out of range


I imagine this is related to the fold changes.

--
components: Library (Lib)
files: test.py
messages: 284218
nosy: Jordon Phillips
priority: normal
severity: normal
status: open
title: Core dump / OverflowError for datetime.fromtimestamp with overly large 
timestamp in Ubuntu 12.04
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file46068/test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com