[issue42763] Exposing a race in the "_warnings" resulting Python parser crash

Xinmeng Xia report at bugs.python.org
Mon Dec 28 22:46:12 EST 2020


Xinmeng Xia <xiaxm at smail.nju.edu.cn> added the comment:

Thank you, but I don't think this is a duplicate of issue42717. This crash is probably caused by the parameter "target" of Thread. "Target" accept the "callable object". Defaults to None. In this program, it's assigned to a "Int object". I think a pre-checking of parameter for such error should be added. 



Minimal test case should be:
===============================
import threading
for i in range(10):
    t = threading.Thread(target=1, daemon=True).start()  
================================= 



In fact, I try this one. No loop, It sometime crashes the parser.(not always, twice in ten times)
==================================
import threading
t = threading.Thread(target=1, daemon=True).start()
==================================

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42763>
_______________________________________


More information about the Python-bugs-list mailing list