[New-bugs-announce] [issue26974] Crash in Decimal.from_float

Serhiy Storchaka report at bugs.python.org
Sun May 8 01:13:47 EDT 2016


New submission from Serhiy Storchaka:

Following example causes a segmentation fault.

from decimal import Decimal
class BadFloat(float):
    def as_integer_ratio(self):
        return 1
    def __abs__(self):
        return self

Decimal.from_float(BadFloat(1.2))

----------
components: Extension Modules
messages: 265113
nosy: facundobatista, mark.dickinson, rhettinger, serhiy.storchaka, skrah
priority: normal
severity: normal
status: open
title: Crash in Decimal.from_float
type: crash
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26974>
_______________________________________


More information about the New-bugs-announce mailing list