From: SourceForge.net <no...@so...> - 2008-01-21 22:34:10
|
Bugs item #1876793, was opened at 2008-01-21 22:18 Message generated for change (Settings changed) made by tallniel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1876793&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 14. List Object Group: development: 8.5.1b1 Status: Open Resolution: None >Priority: 9 Private: No Submitted By: Neil Madden (tallniel) Assigned to: Jan Nijtmans (nijtmans) Summary: Odd crash with args/lreverse/lrange combination Initial Comment: I am seeing a bus error on Mac OS X 10.4.11 (Intel) using current Tcl CVS HEAD. A minimal script to reproduce the crash is the following: proc foo args { set n [lrange $args 0 end] lreverse [lrange $n 0 end-1] } foo bar I'm not entirely sure where the problem lies, but it seems to be some combination of the use of "args", the 2 uses of "lrange", and it seems to rely on the "end-N" syntax (just "lrange $n 0 end" doesn't cause a bus error). I suspect a tricky ref-counting bug somewhere and am investigating further. I'll add more here if I track it down. Neil ---------------------------------------------------------------------- Comment By: Neil Madden (tallniel) Date: 2008-01-21 22:33 Message: Logged In: YES user_id=102050 Originator: YES gdb isn't showing much interesting as is typical with ref-counting bugs: the location of the error is well removed from where the memory violation shows up. An even more minimal script is: lreverse [lrange [lrange foo 0 end] 0 end-1] or lreverse [lrange [lrange foo 0 end-1] 0 end] Both lreverse and the end-1 syntax seem to be needed, but "args" is a red herring. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1876793&group_id=10894 |