Skip to content

[3.9] bpo-42057: Fix peephole optimizer#22802

Merged
methane merged 1 commit into
python:3.9from
methane:bpo-42057
Oct 22, 2020
Merged

[3.9] bpo-42057: Fix peephole optimizer#22802
methane merged 1 commit into
python:3.9from
methane:bpo-42057

Conversation

@methane

@methane methane commented Oct 20, 2020

Copy link
Copy Markdown
Member

@methane methane added the type-bug An unexpected behavior, bug, or error label Oct 20, 2020
@methane
methane requested a review from markshannon October 20, 2020 02:45
@markshannon

Copy link
Copy Markdown
Member

Looks good.
Could you add the following test to test_peepholer.py

def test_42057():
    for i in range(10):
         try:
             raise Exception
         except Exception or Exception:
             pass

Putting the try-except in a loop causes a consistent crash due to stack underflow.

@methane
methane merged commit 07a44d9 into python:3.9 Oct 22, 2020
@methane
methane deleted the bpo-42057 branch October 22, 2020 02:06
@methane

methane commented Oct 22, 2020

Copy link
Copy Markdown
Member Author

Oh, I'm sorrry. I forget to push the requested test case.

@methane

methane commented Oct 22, 2020

Copy link
Copy Markdown
Member Author

Ah! I had pushed it to python/cpython repository instead of my fork.

@methane

methane commented Oct 22, 2020

Copy link
Copy Markdown
Member Author

#22878

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants