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 inglesp
Recipients inglesp
Date 2014-05-05.11:59:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399291198.26.0.236308223501.issue21435@psf.upfronthosting.co.za>
In-reply-to
Content
The following code causes a segfault when run under Python3.4+ on OSX10.9.

# segfaulter.py
import asyncio
 
class A:
    pass
 
class B:
    def __init__(self, future):
        self.future = future
 
    def __del__(self):
        self.a = None
 
@asyncio.coroutine
def do_work(future):
    a = A()
    b = B(asyncio.Future())
 
    a.b = b
    b.a = a
 
    future.set_result(None)
 
future = asyncio.Future()
asyncio.Task(do_work(future))
loop = asyncio.get_event_loop()
loop.run_until_complete(future)


It does matter that the Future is passed to b's __init__ method.

It doesn't matter whether the Future has been resolved.

Attached is the problem report generated by OSX on the crash.
History
Date User Action Args
2014-05-05 11:59:59inglespsetrecipients: + inglesp
2014-05-05 11:59:58inglespsetmessageid: <1399291198.26.0.236308223501.issue21435@psf.upfronthosting.co.za>
2014-05-05 11:59:58inglesplinkissue21435 messages
2014-05-05 11:59:57inglespcreate