[ python-Bugs-1232517 ] OverflowError in time.utime() causes strange traceback

SourceForge.net noreply at sourceforge.net
Tue Jul 5 06:35:28 CEST 2005


Bugs item #1232517, was opened at 2005-07-04 22:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1232517&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Joe Peterson (skyrush)
Assigned to: Nobody/Anonymous (nobody)
Summary: OverflowError in time.utime() causes strange traceback

Initial Comment:
When time.utime() is called with a number larger than
an int, it will fail, but the traceback will not show
the line containing the utime() call.  Instead, the
error will be reported sometime later, depending on the
conditions.

In the attached example (note the file "foo_test_file"
must exist first), a number one larger than maxint is
passed, causing the following error:

Exception exceptions.OverflowError: 'long int too large
to convert to int' in 'garbage collection' ignored
Fatal Python error: unexpected exception during garbage
collection
Aborted

My original discovery of this problem was in a larger
program, and in this original case, I was generating
the large integer via a call to mktime_tz in the rfc822
module in which an out-of-range timezone value was
used.  The call was near the end of a "for" block, and
the OverflowError was reported as coming from the for
statement of the block itself (which did not make sense).

I produced a small test case, which moved the reported
error to "garbage collection".  Thanks to some folks on
the python mailing list for helping to further simplify
the test case.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1232517&group_id=5470


More information about the Python-bugs-list mailing list