[issue25973] Segmentation fault with nonlocal and two underscores

2016-03-05 Thread Nick Coghlan
Nick Coghlan added the comment: And as some additional background as to why segmentation faults provoked by Python code aren't currently considered a security bug: since CPython doesn't include a security sandbox, we're already relying entirely on the OS to provide process isolation. That OS

[issue25973] Segmentation fault with nonlocal and two underscores

2016-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only security fixes are accepted for 3.4. -- ___ Python tracker ___ ___

[issue25973] Segmentation fault with nonlocal and two underscores

2016-03-04 Thread Antti Haapala
Antti Haapala added the comment: So no fix for 3.4 for an obvious SIGSEGV? % python3 Python 3.4.3 (default, Mar 26 2015, 22:03:40) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... def f(self): ...

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4fa8c0c69ee9 by Benjamin Peterson in branch '3.5': make recording and reporting errors and nonlocal and global directives more robust (closes #25973) https://hg.python.org/cpython/rev/4fa8c0c69ee9 New changeset c64e68d703cf by Benjamin Peterson in

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I get a crash when just compile the example. -- Added file: http://bugs.python.org/file41445/test_issue25973.py ___ Python tracker

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant
Konstantin Enchant added the comment: The problem happens only when "nonlocal __something" in a class method. In your case f2() isn't class method. More interesting behavior with underscores - https://gist.github.com/sirkonst/6eff694c4546700417ea --

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Alessandro Cucci
Alessandro Cucci added the comment: I don't think the problem is about the underscores, since this work... class Foo: def f1(self): __obj = object() def f2(): nonlocal __obj __obj = [] f2() return isinstance(__obj, list) f =

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant
New submission from Konstantin Enchant: Code: # --- __obj = object() class Foo: def f1(self): nonlocal __obj f = Foo() f.f1() # <-- segmentation fault # --- -- messages: 257174 nosy: Konstantin Enchant priority:

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Alessandro Cucci
Alessandro Cucci added the comment: quoting the docs: The statement [nonlocal] allows encapsulated code to rebind variables outside of the local scope BESIDES the global (module) scope. -- ___ Python tracker

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, serhiy.storchaka, yselivanov ___ Python tracker

[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant
Konstantin Enchant added the comment: Yes. Case: # --- class A: def f(self): nonlocal __x # --- must raises SyntaxError like case: # --- class A: def f(self): nonlocal x >> SyntaxError: no binding for nonlocal 'x' found