[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

Amaury Forgeot d'Arc report at bugs.python.org
Thu Mar 5 16:38:22 CET 2015


Amaury Forgeot d'Arc added the comment:

Simple script to reproduce the issue:

import sys, time
class C(object):
  def __float__(self):
    return ""
for x in range(10000):
  try:
    time.sleep(C())
  except TypeError:
    pass
  if x % 1000 == 0:
    print(sys.getrefcount(""))

----------
nosy: +amaury.forgeotdarc

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


More information about the Python-bugs-list mailing list