Skip to content
Tcl Source Code Artifact [62a622aa89]
Login

Artifact [62a622aa89]

Artifact 62a622aa8910c27ae3b5f8edc01c23d09ce672a0554a0e13d123806ab2808f9a:

Ticket change [62a622aa89] - Ticket [0b809cd3fc8b6e5e|0b809cd3fc] <i>SIGSEGV on shutdown with TclOO, coroutines, namespaces, and -DPURIFY</i> status still Open with 4 other changes by andy on 2024-12-04 00:22:06.
D 2024-12-04T00:22:06.408
J icomment I\scame\sup\swith\sa\sscript\sthat\scrashes\sTcl\swithout\susing\snamespaces,\sinterpreters,\sor\s`-DPURIFY`,\smaking\sthis\sa\smore\sserious\sissue:\r\n\r\n```\r\noo::class\screate\sclass\r\noo::define\sclass\smethod\syield\s{}\s{yield}\r\ncoroutine\scoro\s[class\snew]\syield\r\ntrace\sadd\scommand\scoro\sdelete\s{apply\s{{args}\s{lrepeat\s0}}}\r\nclass\sdestroy\r\nrename\scoro\s{}\r\n```\r\n\r\nDespite\sthe\sclass\sbeing\sdestroyed,\sthe\scoroutine\sremains\ssuspended\swithin\sthe\smethod,\suntil\sthe\scoroutine\sitself\sis\sforcibly\sdestroyed,\sat\swhich\spoint\sthe\sbogus\serror\smessage\sis\sgenerated.\s\sHowever,\sthe\strace\son\scoroutine\scommand\sdestruction\sforces\san\sallocation\sto\soccur\sbetween\sthe\sfree\sand\sthe\suse-after-free,\sstomping\son\sthe\sfreed\sclass\sstruct,\sthereby\scausing\sthe\serror\smessage\sgeneration\sto\scrash.\r\n\r\nThis\scrash\scan\shappen\swithin\sa\ssafe\sinterpreter:\r\n\r\n```\r\ninterp\screate\s-safe\schild\r\nchild\seval\s{\r\n\s\s\s\s...\sthe\sabove\sscript\s...\r\n}\r\n```\r\n\r\nBy\sthe\sway,\sI\sapologize\sfor\sthe\sformatting\serror\sin\sthe\sprior\scomment,\sno\sway\sto\sedit\sit\snow.\s\sIf\sthe\sValgrind\slisting\sis\smessed\sup,\sjust\snarrow\syour\sbrowser\swindow\suntil\sit\swraps\snicely.
J login andy
J mimetype text/x-markdown
J username andy
K 0b809cd3fc8b6e5e19cd8a9a91357e425472cd69
U andy
Z 16dbe7936d419718b539135b5cdec61b