This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Camion
Recipients Camion, terry.reedy
Date 2020-08-30.04:27:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <898911945.351226.1598761642533@mail.yahoo.com>
In-reply-to <1598745657.66.0.622995570789.issue41637@roundup.psfhosted.org>
Content
Well, I know an infinite loop  is not necessarily wrong, especially in a generator. and I also know how to avoid this problem.
My problem is not there. It's just that I believe it should possibly crash the program and not the interpreter. 
I even wonder if being able to cause an interpreter crash couldn't become a security hole in some cases.probably the basic solution would be to forward an exception to the program if the interpreter running it gets an allocation error.

About core dump or crash report, it didn't generate one but I think I should install a few things on the computer to get it.

    Le dimanche 30 août 2020 à 02:02:01 UTC+2, Terry J. Reedy <report@bugs.python.org> a écrit :  

Terry J. Reedy <tjreedy@udel.edu> added the comment:

On Windows, I get an indefinite hang rather than an overt crash with a crash box.  I believe that there was some swapping out to disk.  I got the same with list(itertools.count()). 

If you got a core dump or crash report, you might upload it.  

There is infinite looping in the argument collection but no infinite recursion (calling) here.  The latter is detected pretty quickly because of sys.recursion limit.  Infinite loops by themselves are not necessarily wrong.  This typing box is run by an infinite loop.  Change your 'use' to

def use(iter):
    for i in iter: print(i)

and there would be no problem.  So I disagree with 'should have been detected'.  I am only leaving this open in case you got an overt crash for this particular loop.  Those we try to fix.

----------
nosy: +terry.reedy
title: Calling a function with an infinite number of parameters is not detected and crash the interpreter instead of causing an exception -> Calling with an infinite number of parameters is not detected
versions: +Python 3.9

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41637>
_______________________________________
History
Date User Action Args
2020-08-30 04:27:27Camionsetrecipients: + Camion, terry.reedy
2020-08-30 04:27:27Camionlinkissue41637 messages
2020-08-30 04:27:27Camioncreate