From: SourceForge.net <no...@so...> - 2010-12-25 19:09:14
|
Bugs item #3142026, was opened at 2010-12-22 21:28 Message generated for change (Comment added) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3142026&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: 17. Commands I-L Group: current: 8.6b1 Status: Open Resolution: None Priority: 8 Private: No Submitted By: brad harder (bharder) Assigned to: Donal K. Fellows (dkf) Summary: lsort -integer violates memory Initial Comment: lsort -integer violates memory allocation when Tcl is compiled w/ TCL_MEM_DEBUG. This violation was introduced between 20Aug2009 and 21Aug2009 in CVS repo. ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2010-12-25 19:09 Message: I'd like to emphasize that I don't mean to be difficult. I suspect that there may be some weird problem in the code to handle the temporary memory handling in the lsort command. But I can't reproduce for some reason; I need the stack trace from the crash and can't make it myself. :-( There's too many things that are trickier than they look in this code for me to hunt without at least a copy of a picture of the smoking gun available to me. :-/ ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2010-12-25 08:57 Message: I usually build with --enable-symbols=mem (so I can run memleak tests) and wasn't seeing it, and even with --enable-symbols=all in a clean build I still don't see it. ---------------------------------------------------------------------- Comment By: brad harder (bharder) Date: 2010-12-23 19:47 Message: Hi Donal -- indeed, my first patch was poor... I've reviewed and submitted 'patch-aa.v2' which is much more specific in the code it targets (strictly [lsort]) and does pass the case that was previously faulting. This is _not_ to say that [lindex] etc won't be subject to this same class of bug, but I won't speculate with my patch. ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2010-12-23 18:41 Message: Donal - you have to compile with --enable-symbols=all (IOW -DTCL_MEM_DEBUG) to ensure the crash. Brad used NetBSD amd64 and I used SuSE Linux-64 to confirm. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2010-12-23 12:57 Message: BTW, your patch is definitely not minimal. It touches unrelated code (the bits relating to lines 1312 to 1346 are nothing to do with [lsort]). ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2010-12-23 12:38 Message: I don't see any problem when building on OSX. Do you have a stack trace? ---------------------------------------------------------------------- Comment By: brad harder (bharder) Date: 2010-12-23 08:22 Message: Can confirm patch applies cleanly against CVS co of 23Dec2010 as well, and that Tcl 8.6 build passes test. ---------------------------------------------------------------------- Comment By: brad harder (bharder) Date: 2010-12-23 08:05 Message: see attached patch-aa for a minimal (absolute minimal?) patch against 14 Dec code that appears to solve this specific issue (as hinted by jeff hobbs). ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2010-12-22 21:29 Message: Possibly related to the Tcl_LsortObjCmd change from ckalloc to stackalloc? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3142026&group_id=10894 |