[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Sebastian Krause
New submission from Sebastian Krause : The following lines trigger a segmentation fault: class E(BaseException): def __new__(cls, *args, **kwargs): return cls def a(): yield a().throw(E) Source with a bit more explanation: https://gist.github.com/coolreader18/6dbe0be2ae2192e90e1a8

[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Christian Heimes
Christian Heimes added the comment: I can reproduce the issue on master: >>> class E(BaseException): ... def __new__(cls, *args, **kwargs): ... return cls ... >>> def a(): yield ... >>> a().throw(E) Program received signal SIGSEGV, Segmentation fault. _Py_DECREF (op=, lineno=541

[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! Since you already investigated the code, do you mind to create a PR which fixes a crash? I think that adding PyExceptionInstance_Check() in _PyErr_CreateException() could fix the issue. -- ___ Python

[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Noah
Noah added the comment: I'm not sure if this will actually appear as a message (I just registered for the bug tracker and I'm not sure how it works), but I wrote the gist and I can definitely make a PR. -- nosy: +coolreader18 ___ Python tracker <

[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Noah
Change by Noah : -- keywords: +patch pull_requests: +17126 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17658 ___ Python tracker ___ ___