[New-bugs-announce] [issue41637] Calling a function with an infinite number of parameters is not detected and crash the interpreter instead of causing an exception

Camion report at bugs.python.org
Wed Aug 26 01:23:56 EDT 2020


New submission from Camion <camion_spam-pybugs at yahoo.com>:

The following code will obviously cause a memory leak, but this will not be detected and crash the interpreter:

    def inf():
      while True: yield 0

    def use(*parm):
      for i in parm: print(i)

and then

    use(*inf())

or 

    print(*int())

The reason of this test is that I wanted to check if ever python would be able to make lazy evaluation in parameter passing (It would be nice if it was but it is not the case). However, at least, I think this error should have been detected as well as an infinite recursion is, because it even has been able to crash and reboot a not so old (18) version of linux Mint.

----------
components: Interpreter Core
messages: 375904
nosy: Camion
priority: normal
severity: normal
status: open
title: Calling a function with an infinite number of parameters is not detected and crash the interpreter instead of causing an exception
type: crash
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41637>
_______________________________________


More information about the New-bugs-announce mailing list