|
2026-11-01
| ||
| 20:39 | • Ticket [b4637c4312] upvar segfault for destroyed object status still Closed ... artifact: c4d85129c8 user: dkf | |
| 20:38 | • Closed ticket [b4637c4312]. artifact: e3b52dc75a user: dkf | |
| 20:36 | Fix [28de60cef5] and [b4637c4312] check-in: f3f08274f7 user: dkf tags: trunk, main | |
| 20:30 | Fix [28de60cef5] and [b4637c4312] check-in: 298d1d97d5 user: dkf tags: core-9-0-branch | |
| 20:11 | Backport of Fix [b4637c4312]: [upvar] to an object variable after the object was destroyed in its me... check-in: eed1c88593 user: dkf tags: oo-destructor-deleted-namespace-90 | |
| 17:42 | • Ticket [b4637c4312] upvar segfault for destroyed object status still Open wi... artifact: d80dd4c630 user: dkf | |
|
2026-10-13
| ||
| 19:08 | • Ticket [b4637c4312]: 4 changes artifact: 42f3dc584f user: serhiy.storchaka | |
| 19:06 | Fix [b4637c4312]: [upvar] to an object variable after the object was destroyed in its method crashed... closed check-in: de6527681f user: serhiy.storchaka tags: oo-destructor-deleted-namespace | |
|
2025-05-08
| ||
| 09:31 | • New ticket [b4637c4312] upvar segfault for destroyed object. artifact: 0e8b900f7d user: ooa64_ua_fm | |
upvar segfault for destroyed object
Closed / Fixedb4637c4312a59ca57ef8148623f973a7493e950aCreated 2 years agoUpdated 31 days ago
Descriptionplain2025-05-08 09:31:31
This script crashes tcl interpreter (segmentation fault on linux or silent crash on windows):
---
proc crash {varname} {
upvar $varname V ;# <<<< crashes here !!!
}
oo::class create C {
variable V
method run {} {
my destroy
crash V
}
}
C create c
c run
---
Trying on:
windows tcl 8.6.16, 9.0.2
linux tcl 8.6.12
https://onecompiler.com/tcl 8.6.14
Referenced by4
f3f08274f7Fix [28de60cef5] and [b4637c4312] check-in2026-11-01 20:36:04298d1d97d5Fix [28de60cef5] and [b4637c4312] check-in2026-11-01 20:30:55eed1c88593Backport of Fix [b4637c4312]: [upvar] to an object variable after the object was destroyed in its method crashed. check-in2026-11-01 20:11:51de6527681fFix [b4637c4312]: [upvar] to an object variable after the object was destroyed in its method crashed. Same cause as [28de60cef5]; add a test. check-in2026-10-13 19:06:40
serhiy.storchakawiki2026-10-13 19:08:05
Same cause as [28de60cef5]: after [my destroy] the
namespace of the object is deleted, and resolving V for upvar in the
method looked it up there. It also crashes with 8.6.17, 9.0 and 9.1.
Proposed fix in branch oo-destructor-deleted-namespace: the script returns normally, and V is a new unset variable. Test oo-3.14.
dkfmarkdown2026-11-01 17:42:58
Confirming the crash with 9.1.0, and it looks like something that wants a backport fix to 9.0 too.
No plans to backport to 8.6, given the support status of that release line.
dkfmarkdown2026-11-01 20:38:45
Fix applied to 9.0 onwards.
dkfmarkdown2026-11-01 20:39:55
BTW, thanks for hunting this down, Serhiy.
Log in (anonymous is fine) to add a comment.