Tcl Source Code

View Ticket
Login
Ticket UUID: 2823282
Title: direct eval [expr] not NRE safe (Tcl_ExprObj)
Type: Bug Version: obsolete: 8.6b1.1
Submitter: dgp Created on: 2009-07-17 20:01:43
Subsystem: 47. Bytecode Compiler Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-08-13 00:01:30
Resolution: Fixed Closed By: dgp
    Closed on: 2009-08-12 17:01:30
Description:
% coroutine foo apply {{} {set expr expr; $expr {[yield]}}}
cannot yield: C stack busy

I think this also causes trouble in the expression
evaluation portion of direct eval [for] and [while]
commands.
User Comments: dgp added on 2009-08-13 00:01:30:

allow_comments - 1


Patching up the callers of Tcl_ExprBooleanObj()
is better tracked in Bug 2823276.

dgp added on 2009-08-12 23:07:32:
Patch / TIP 353 committed to HEAD.

Still open while I check on the [for], [while] claims.

dgp added on 2009-07-30 22:54:56:
Latest patch includes updates to docs.

dgp added on 2009-07-30 22:54:42:

File Deleted - 336457:

dgp added on 2009-07-30 22:54:30:

File Added - 337337: 2823282-2.patch

dgp added on 2009-07-25 03:50:27:

File Deleted - 335608:

dgp added on 2009-07-25 03:50:18:

File Added - 336457: 2823282-1.patch

dgp added on 2009-07-25 03:49:20:
Here's a cleaned up patch to review.

There are still a couple of TODO's
regarding a more careful audit of where
the interp state should be saved/reset/restored,
but the big picture is right now, and better
commented.

Also missing is docs and the TIP 
for the new public routine
Tcl_NRExprObj().

dgp added on 2009-07-19 11:16:32:
Needs some more refinement but here's
a first functional patch that fixes the bug.

dgp added on 2009-07-19 11:15:53:

File Added - 335608: 2823282.patch

dgp added on 2009-07-19 01:43:56:
Patch under construction.

dkf added on 2009-07-18 19:29:13:
There's no TclNRExpr() API or equivalent, so fixing this requires substantial work. Assigning to person better suited than me to carry this out.

Attachments: