Bug report
Bug description:
This is a sub-issue of #153852 with the gist here.
This reproducer crashes in free-threaded build with TSan:
importthreadingROUNDS=10000box= [None]
enter=threading.Barrier(2)
leave=threading.Barrier(2)
defreader():
for_inrange(ROUNDS):
enter.wait()
obj=box[0]
obj.__getstate__()
leave.wait()
defwriter():
foriinrange(ROUNDS):
box[0] =type(f"C{i}", (), {})()
enter.wait()
obj=box[0]
setattr(obj, f"{i}", 1)
leave.wait()
threads= [threading.Thread(target=reader), threading.Thread(target=writer)]
forthreadinthreads:
thread.start()
forthreadinthreads:
thread.join()See the gist for more information.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
This is a sub-issue of #153852 with the gist here.
This reproducer crashes in free-threaded build with TSan:
See the gist for more information.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
dk_nentriesin_PyObject_IsInstanceDictEmpty#153882dk_nentriesin_PyObject_IsInstanceDictEmpty(GH-153882) #154349