This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xxm
Recipients xxm
Date 2021-07-23.05:05:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627016741.96.0.306120219144.issue44720@roundup.psfhosted.org>
In-reply-to
Content
This piece of code is originally from https://github.com/python/cpython/tree/main/Lib/test/test_weakref.py. In function test_proxy_iter(), we change the original data dependency and then this generated test case (see the following "test.py") crashes Python. 

Crashing Python version: 3.6-master(3.11.0a0)

test.py
=========================
import weakref


def test_proxy_iter():
    obj = None

    class MyObj:

        def __iter__(a):
            nonlocal obj
            del obj
-           return NotImplemented
+           return p
    obj = MyObj()
-   p = weakref.proxy(obj)
+   p = weakref.proxy(TypeError)

-   'blech' in p
+   'blech' in obj

test_proxy_iter()
===========================


system: ubuntu 16.04
crash: segmentation fault
History
Date User Action Args
2021-07-23 05:05:42xxmsetrecipients: + xxm
2021-07-23 05:05:41xxmsetmessageid: <1627016741.96.0.306120219144.issue44720@roundup.psfhosted.org>
2021-07-23 05:05:41xxmlinkissue44720 messages
2021-07-23 05:05:41xxmcreate