From: Georg Brandl Date: Tue, 28 Aug 2007 18:54:44 +0000 (+0000) Subject: Add a crasher for the thread-unsafety of file objects. X-Git-Tag: v2.6a1~1396 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf138333ce006c0b3bc49ddd4379312171ef2aae;p=thirdparty%2FPython%2Fcpython.git Add a crasher for the thread-unsafety of file objects. --- diff --git a/Lib/test/crashers/file_threads.py b/Lib/test/crashers/file_threads.py new file mode 100644 index 000000000000..d82ad3c286bf --- /dev/null +++ b/Lib/test/crashers/file_threads.py @@ -0,0 +1,8 @@ +# An example for http://bugs.python.org/issue815646 + +import thread + +while 1: + f = open("/tmp/dupa", "w") + thread.start_new_thread(f.close, ()) + f.close()