From: SourceForge.net <no...@so...> - 2009-06-08 22:18:06
|
Bugs item #2803109, was opened at 2009-06-08 20:11 Message generated for change (Settings changed) made by ferrieux You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2803109&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: 10. Objects Group: development: 8.6b1.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Julian Noble (juliannoble) >Assigned to: Don Porter (dgp) Summary: tsv - string rep - core dump Initial Comment: Tcl 8.6b1.1 on FreeBSD - (multi core system) Attempting to read back an empty string/empty list from a tsv is causing the process to crash with: UpdateStringProc for type 'string' failed to create a valid string rep The initialisation is done with: tsv::set t_1 accounts_on_thread [list] Retrieving the value (in the same thread) later like so: set streams_on_thisthread [tsv::get t_1 accounts_on_thread] This assignment appears to work - but any subsequent attempt to use the value $streams_on_thisthread as a string causes the crash. (although 'string length' works and returns 0, but 'string bytelength' triggers the crash) Using the Tweezer package the type is reported as string and the refcount is 2. Initialising it the following way also results in the problem: tsv::set t_1 accounts_on_thread "" The following values however work without error: tsv::set t_1 accounts_on_thread " " tsv::set t_1 accounts_on_thread [lrange [list] 0 0] tsv::set t_1 accounts_on_thread [string range "" 0 -1] tsv::set t_1 accounts_on_thread [string range "" 0 0] I've been unable to reproduce the error in a simple script. (the real app has a handful of threads and is doing some sqlite work - the crash occurs around 30s in) (see also discussion on clt: http://groups.google.com/group/comp.lang.tcl/browse_frm/thread/6fec903446cd87a4/4a8a163a0755856a#4a8a163a0755856a ) ---------------------------------------------------------------------- Comment By: Alexandre Ferrieux (ferrieux) Date: 2009-06-08 23:58 Message: OK I have a minimal repro, now that you have explained the mechanism on the chat: % package require Thread % set x "" % string length $x % tsv::set a b $x % puts [tsv::get a b] UpdateStringProc for type 'string' failed to create a valid string rep ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-06-08 23:34 Message: This appears to be flaw in the revised UpdateStringOfString. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2009-06-08 20:38 Message: Re-assigned to Zoran as the maintainer of the Thread extension. Which seems to be heavily involved. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2803109&group_id=10894 |