New submission from Oren Milman:
both of the following true division and multiplication operations crash the
interpreter:
import datetime
class BadFloat(float):
def as_integer_ratio(self):
return (1 << 1000) - 1
datetime.timedelta() / BadFloat()
datetime.timedelta() * BadFloat()
this is because both multiply_float_timedelta() and truedivide_timedelta_float()
(in Modules/_datetimemodule.c) assume as_integer_ratio() returns tuple.
----------
components: Interpreter Core
messages: 300954
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: crashes in multiply_float_timedelta() and in truedivide_timedelta_float()
type: crash
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue31293>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com