Tcl Source Code

View Ticket
Login
Ticket UUID: 3610632
Title: NRE-enable cross-interp aliases
Type: RFE Created on: 2013-04-11 22:51:36
Submitter: dgp Assigned to: dgp
Subsystem: 60. NRE and coroutines Severity: Minor
Priority: 5 Medium Last modified: 2013-08-27 18:10:30
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: current: 8.6.0
Description:
$ cat crash.tcl
interp create slave
interp alias slave yeeld {} yield foo
interp alias {} Yield slave yeeld
puts [coroutine Z Yield]
puts [Z bar]
$ make shell SCRIPT=crash.tcl
...
make: *** [shell] Segmentation fault


Would be nice to have this Just Work, but
short of that there's gotta be a better
Don't Do That signal than crashing.
User Comments:
dgp added on 2013-04-17 00:27:45:
With debugging turned on, the NRE_ASSERT()
at line 8502 or so in tclBasic.c detects trouble
and panic before we get to corruption and crashing.
If we cannot make this work, then making that
assertion raise an error in normal operations seems
like an improvement.

dgp added on 2013-08-21 19:08:42:
The crash is due to Bug [8ff0cb9fe1].

Once that is fixed, this becomes an RFE
to "make [yield]/NRE work across multiple interps".