[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-05-05 Thread Irit Katriel
Irit Katriel added the comment: This was fixed in 3.9+ and 3.8 is in security fix now, so closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Pablo, are you OK closing this without a 3.8 backport? I would be supportive, but we should check with Ɓukasz as he is the release manager of 3.8 -- ___ Python tracker

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: Pablo, are you OK closing this without a 3.8 backport? -- ___ Python tracker ___ ___ Python-bugs-li

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: There were additional merge conflicts when I tried to create a manual 3.8 backport, more significant than the 3.9 ones IIRC. -- ___ Python tracker ___

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-01-13 Thread Mark Shannon
Mark Shannon added the comment: Does this need backporting to 3.8, or is 3.9 sufficient? -- ___ Python tracker ___ ___ Python-bugs-

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-11-17 Thread Mark Shannon
Mark Shannon added the comment: New changeset 48a9c0eb2a3304ea64d1b32fdf9db853d5d8c429 by Irit Katriel in branch '3.9': [3.9] bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) (GH-23303) https://github.com/python/cpython/commit/48a9c0eb2a3304ea64d1b32fdf9db853d5d8c429

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-11-15 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22194 pull_request: https://github.com/python/cpython/pull/23303 ___ Python tracker ___

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-10-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 22395 should be backported to 3.8 and 3.9 -- nosy: +pablogsal ___ Python tracker ___ __

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-10-07 Thread Irit Katriel
Irit Katriel added the comment: After studying Mark's patch and the rest of the code, I understand the for loop oddity. The else block of the for loop comes after the compiler_pop_fblock(c, FOR_LOOP, start); So you can do this all day and it won't complain: for x in '1': pass else: for x

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-25 Thread Mark Shannon
Mark Shannon added the comment: New changeset 02d126aa09d96d03dcf9c5b51c858ce5ef386601 by Mark Shannon in branch 'master': bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) https://github.com/python/cpython/commit/02d126aa09d96d03dcf9c5b51c858ce5ef386601 --

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +21435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22395 ___ Python tracker ___ ___

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Irit Katriel
Irit Katriel added the comment: On windows 10, master: > python.bat --version Running Release|Win32 interpreter... Python 3.10.0a0 >python.bat x.py Running Release|Win32 interpreter... SyntaxError: too many statically nested blocks That's when x.py has the nested for loops without else. The

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Mark Shannon
Mark Shannon added the comment: iritkatriel What error do you see and on what version? -- ___ Python tracker ___ ___ Python-bugs-l

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Irit Katriel
Irit Katriel added the comment: Another oddity: This gives the error: for x in '1': for x in '2': for x in '3': for x in '4': for x in '5': for x in '6': for x in '8': for x in '9': for x in '10': for x in '11': for x in '12': f

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Irit Katriel
Irit Katriel added the comment: Unlike the 22 nested while, if 1: if 2: ... if 22: pass doesn't error. Is that correct? -- ___ Python tracker ___ _

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Humm, my supposition was not absolutely correct. The cause is that the compiler and the interpreter use the stack of size CO_MAXBLOCKS for different things. The interpreter pushes a thing for the "except" clause, while the compiler does not do it. ---

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a bug. Compiler explicitly checks if the number of nested "try" blocks does not exceed the limit of CO_MAXBLOCKS, but it does not count implicit "try" blocks inserted when your assign an exception in the "except" clause. try: ... exce

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-23 Thread Irit Katriel
Irit Katriel added the comment: The error is coming from here: https://github.com/python/cpython/blob/cb9879b948a19c9434316f8ab6aba9c4601a8173/Objects/frameobject.c#L958 and CO_MAXBLOCKS is defined in Include/cpython/code.h #define CO_MAXBLOCKS 20 /* Max static block nesting within a function

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-23 Thread Irit Katriel
Irit Katriel added the comment: In summary, I think this is not-a-bug. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-03-11 Thread myzhang1029
New submission from myzhang1029 : I apologize for describing this issue badly, but I'll try anyway. The code to demonstrate the issue is attached, so it might be better to read that instead. I noticed that when more than 10 exceptions are raised sequentially (i.e. one from another or one durin