[issue45773] Compiler hangs during jump elimination

2022-02-03 Thread Brandt Bucher


Change by Brandt Bucher :


--
priority: release blocker -> 
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2022-02-03 Thread miss-islington


miss-islington  added the comment:


New changeset ff6948b1286c854ee77dfc0b23b9d828b36873e4 by Miss Islington (bot) 
in branch '3.10':
bpo-45773: Remove invalid peephole optimizations (GH-31066)
https://github.com/python/cpython/commit/ff6948b1286c854ee77dfc0b23b9d828b36873e4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2022-02-03 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29284
pull_request: https://github.com/python/cpython/pull/31101

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2022-02-03 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset e0433c1e70254d4d0357a9e14596929a04bdf769 by Brandt Bucher in 
branch 'main':
bpo-45773: Remove invalid peephole optimizations (GH-31066)
https://github.com/python/cpython/commit/e0433c1e70254d4d0357a9e14596929a04bdf769


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2022-02-01 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29251
pull_request: https://github.com/python/cpython/pull/31066

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2022-02-01 Thread Brandt Bucher


Brandt Bucher  added the comment:

My fix for this seems to have erroneously added two invalid new jump threads:

POP_JUMP_IF_FALSE(a) to JUMP_IF_FALSE_OR_POP(b) is folded into 
POP_JUMP_IF_FALSE(b)
POP_JUMP_IF_TRUE(a) to JUMP_IF_TRUE_OR_POP(b) is folded into POP_JUMP_IF_TRUE(b)

The good news is that I can't get the compiler to actually emit these 
particular jump sequences. It still needs to be fixed ASAP, though.

--
nosy: +pablogsal
priority: high -> release blocker
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2021-12-10 Thread Irit Katriel


Change by Irit Katriel :


--
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2021-11-13 Thread Brandt Bucher


Change by Brandt Bucher :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2021-11-11 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset a89bbde83fe7f8cc347341e7ec57cda3ba312530 by Brandt Bucher in 
branch '3.10':
[3.10] bpo-45773: Stop "optimizing" certain jump patterns (GH-29526)
https://github.com/python/cpython/commit/a89bbde83fe7f8cc347341e7ec57cda3ba312530


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2021-11-11 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +27776
pull_request: https://github.com/python/cpython/pull/29526

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2021-11-11 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset 27b69e60daa7b191ee6bc76fb6d5fb7d793062ab by Brandt Bucher in 
branch 'main':
bpo-45773: Stop "optimizing" certain jump patterns (GH-29505)
https://github.com/python/cpython/commit/27b69e60daa7b191ee6bc76fb6d5fb7d793062ab


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2021-11-09 Thread Brandt Bucher


Change by Brandt Bucher :


--
keywords: +patch
pull_requests: +27756
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29505

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45773] Compiler hangs during jump elimination

2021-11-09 Thread Brandt Bucher


New submission from Brandt Bucher :

The following code hangs during compilation on 3.11 and 3.10:

>>> while True or spam: pass

Our peepholer gets stuck in a loop, repeatedly "optimizing" instruction 4 
(POP_JUMP_IF_TRUE -> JUMP_ABSOLUTE):

  1   0 JUMP_ABSOLUTE0 (to 0)
  2 LOAD_NAME0 (spam)
  4 POP_JUMP_IF_TRUE 0 (to 0)

After optimizing jumps to jumps like these, we always back up and attempt to 
optimize the same instruction again (which makes it possible to optimize three 
or more chained jumps on the same line). The issue is that this particular 
optimization doesn't actually change the instruction, since both jumps target 
the same exact block. Since nothing changes, we loop forever.

The fix is really simple: just skip the optimization if instr->i_target == 
target->i_target. We already do this for several other types of jumps; it just 
looks like POP_JUMP_IF_TRUE and POP_JUMP_IF_FALSE might have been missed.

I'll have a PR up soon.

--
assignee: brandtbucher
components: Interpreter Core
messages: 406046
nosy: Mark.Shannon, brandtbucher
priority: high
severity: normal
status: open
title: Compiler hangs during jump elimination
type: crash
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com