Overview
| Artifact ID: | eebaac8c7729e04c11af493984750993480318cb |
|---|---|
| Ticket: | 1af8de570511f68630bd54c24579ceef69c63546
TEBC mishandled in [string replace] optimization ? |
| User & Date: | bch on 2016-03-19 00:43:51 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
This: proc p1 { val } { set ret "" for { set i 0 } { $i < $val } { incr i } { set ret [format "0%s" $ret] } return $ret } proc p2 { val } { return [string replace [p1 4] 1 1 $val] } puts [ set s [p2 x] ] Will cause a fault. I think I've tracked it to an optimization for inlining a [string replace] (if the string going in is same length as going out, optimized routine), and it appears the _effects_ can be eliminated by adjusting [/artifact/c36c352f54aa5c40?ln=5272] from calling NEXT_INST_F() with 1,1,1, versus 1,0,0. I am not versed in the inner workings of the compiler though, so will leave this for experts and watch with interest what discussions follow. - foundin changed to: "abb9522f54"
- is_private changed to: "0"
- login: "bch"
- priority changed to: "5 Medium"
- private_contact changed to: "0cf17391f69fcfd64bbde2b38bbfbb45c95439e6"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "bch"
- subsystem changed to: "47. Bytecode Compiler"
- title changed to: "TEBC mishandled in [string replace] optimization ?"
- type changed to: "Bug"