Message378952
I confirmed the issue. The simple version of the reproducer is:
```
def callee():
raise Exception
def caller():
try:
callee()
except Exception or Exception:
pass
caller()
```
I can see assertion failure consisntently, when I use python --with-pydebug.
It seems peephole bug. Without peephole:
```
7 >> 12 DUP_TOP
14 LOAD_GLOBAL 1 (Exception)
16 JUMP_IF_TRUE_OR_POP 20
18 LOAD_GLOBAL 1 (Exception)
>> 20 JUMP_IF_NOT_EXC_MATCH 32
22 POP_TOP
24 POP_TOP
26 POP_TOP
8 28 POP_EXCEPT
30 JUMP_FORWARD 2 (to 34)
>> 32 RERAISE
>> 34 LOAD_CONST 0 (None)
36 RETURN_VALUE
```
And with peephole:
```
7 >> 12 DUP_TOP
14 LOAD_GLOBAL 1 (Exception)
16 POP_JUMP_IF_TRUE 22
18 LOAD_GLOBAL 1 (Exception)
20 JUMP_IF_NOT_EXC_MATCH 32
>> 22 POP_TOP
24 POP_TOP
26 POP_TOP
8 28 POP_EXCEPT
30 JUMP_FORWARD 2 (to 34)
>> 32 RERAISE
>> 34 LOAD_CONST 0 (None)
36 RETURN_VALUE
```
JUMP_IF_TRUE_OR_POP is converted into POP_JUMP_IF_TRUE. Exception is popped although JUMP_IF_NOT_EXC_MATCH needs it. |
|
Date |
User |
Action |
Args |
2020-10-19 15:05:32 | methane | set | recipients:
+ methane, Mark.Shannon, FFY00, miurahr |
2020-10-19 15:05:32 | methane | set | messageid: <1603119932.42.0.367208267189.issue42057@roundup.psfhosted.org> |
2020-10-19 15:05:32 | methane | link | issue42057 messages |
2020-10-19 15:05:32 | methane | create | |
|