[issue37830] continue and break in finally with return in try results with segfault

2019-08-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

For forbidding 'break', 'continue' and 'return' in the 'finally' clause please 
open a topic on Python-Dev.

--
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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ed146b52a3b6537689324e3bd9952055f9c6b43d by Serhiy Storchaka in 
branch '3.8':
[3.8] bpo-37830: Fix compilation of break and continue in finally. (GH-15320) 
(GH-15456)
https://github.com/python/cpython/commit/ed146b52a3b6537689324e3bd9952055f9c6b43d


--

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +15151
pull_request: https://github.com/python/cpython/pull/15456

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ef61c524ddeeb56da3858b86e349e7288d68178e by Serhiy Storchaka in 
branch 'master':
bpo-37830: Fix compilation of break and continue in finally. (GH-15320)
https://github.com/python/cpython/commit/ef61c524ddeeb56da3858b86e349e7288d68178e


--

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think PR 15320 should be merge as soon as possible at least to fix the 
segfault and stop the release blocker. Anything else can wait IMHO

--

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-23 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is marked as a release blocker. The last beta is scheduled for Monday. 
Please decide how to proceed ASAP.

--

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 15320 fixes a regression by changing the compiler. None is now always pushed 
on the stack before entering a try...finally block. The "return" statement with 
a non-constant value replaces it, so the stack is balanced.

--

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-14 Thread Nick Coghlan


Nick Coghlan  added the comment:

Even though it doesn't fully resolve this crash, I'd still like us to consider 
reverting the change to allow "continue" in try/finally blocks.

It doesn't seem to have a compelling practical motivation behind it (beyond the 
fact that it's nice not to impose arbitrary restriction on users), and even if 
it's feasible in CPython now, it still creates a non-trivial amount of work for 
other Python implementations that are trying to remain consistent with what 
CPython allows.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There may be a solution that does not require a significant change to the code 
generator, but small changes in many places with keeping the general structure. 
But it is a difficult task, so it takes some time. Don't worry, I'm working on 
it.

--

___
Python tracker 

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



[issue37830] continue and break in finally with return in try results with segfault

2019-08-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Note, that we have a regression in 3.8. There is a use case for "break" in 
"finally", and such code is even used in the stdlib. And who know in what 
third-party code it is used. In specific circumstances (see msg349513) it now 
can cause a crash. Other example:

import contextlib
def simple():
with contextlib.nullcontext():
for number in range(2):
try:
return number
finally:
break

simple()

It just raise an exception in 3.8, not crash:

Traceback (most recent call last):
  File "", line 1, in 
  File "", line 7, in simple
TypeError: 'range_iterator' object is not callable

--
stage: patch review -> 
title: continue in finally with return in try results with segfault -> continue 
and break in finally with return in try results with segfault

___
Python tracker 

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