Message71691
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2008年08月21日.22:00:12 |
| SpamBayes Score |
4.6868114e-05 |
| Marked as misclassified |
No |
| Message-id |
<1219356014.43.0.144260212562.issue3638@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
mainloop() is a method of a Tkapp object, but it's also a method of
_tkinter module. In TkApp_MainLoop, self is seen as a TkappObject
whereas it can be a module object! So instruction
like "self->dispatch=1" will replace a random byte in the module
object (eg. ob_type attribute). Example to crash:
import gc
import _tkinter
_tkinter.mainloop()
gc.collect()
It always crashs in my Python 3.0, but not in Python 2.6.
Solution: just remove _tkinter.mainloop() => it should have no side
effect since users use tkinter (without the "_") which only uses
Tkapp.mainloop() (the right way to use Tkapp_MainLoop() function).
Solution "implemented" in the patch. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年08月21日 22:00:14 | vstinner | set | recipients:
+ vstinner |
| 2008年08月21日 22:00:14 | vstinner | set | messageid: <1219356014.43.0.144260212562.issue3638@psf.upfronthosting.co.za> |
| 2008年08月21日 22:00:13 | vstinner | link | issue3638 messages |
| 2008年08月21日 22:00:13 | vstinner | create |
|