Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-02-04
21:58 • Closed ticket [3603163fff]: array set inside eval inside proc: bad stack adj... artifact: fc11ed7bf4 user: dkf
20:23 • Ticket [3603163fff]: 5 changes artifact: b776cddc29 user: dkf
16:01 • Ticket [3603163fff]: 4 changes artifact: ad435469c9 user: dkf
14:40
[3603163]: Stop crash in weird case where [eval] is used to make [array set] get confused about whet... check-in: 8426c3a5db user: dkf tags: trunk
14:30
[3603163]: Prevent odd crashes in 'eval {array set ...}' check-in: 48c9fc5cdf user: dkf tags: dkf-bytecode-8.6-main
2013-02-03
10:43 • New ticket [3603163fff] array set inside eval inside proc: bad stack adjustm... artifact: 0770022ba6 user: pooryorick

[array set] inside [eval] inside proc: bad stack adjustment

Closed / Fixed3603163fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 14 years ago
Descriptionplain2013-02-03 10:43:23
The test below (added to trace.test in my case) results in the following error with --enable-symbols=compile:

Test file error: bad stack adjustment when compiling array (was 0 instead of 1)

without any "--enable-symbols" option, it simply produces a segmentation fault


test eval_array_in_proc  {[array set] command in an eval script in a proc} {
    unset -nocomplain x
        proc body {} {
                global x
                eval {array set x {a 1}}
        }
        body
} {}
dkfplain2013-02-04 16:01:22
The purpose of that panic is to detect serious compilation problems at a point when it is possible to figure out what went wrong, rather than at some later time when a Tcl stack smash happens. Thanks for reporting!

Was this with 8.6.0 release or with the trunk? I've been tinkering with things since 8.6.0 so it might already be fixed...
dkfplain2013-02-04 20:23:58
Whatever. It's the trunk that's crashing with this test when I try it. :-(

Prio bumped to max.
dkfplain2013-02-04 21:58:45
allow_comments - 1

Should be fixed on trunk
Log in (anonymous is fine) to add a comment.