summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclCmdIL.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 930894a..bab001c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-14 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclCmdIL.c (Tcl_LsortObjCmd): Use ckalloc() to allocate
+ SortElement arrays instead of TclStackAlloc() which isn't getting
+ alignment right. Workaround for [Bug 1914503].
+
2008-03-14 Reinhard Max <max@suse.de>
* generic/tclTest.c: Ignore the return value of write() when
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 18a4a72..d76b49f 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.136 2008/01/22 11:38:33 msofer Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.137 2008/03/14 19:46:17 dgp Exp $
*/
#include "tclInt.h"
@@ -3658,8 +3658,7 @@ Tcl_LsortObjCmd(
* begins sorting it into the sublists as it appears.
*/
- elementArray = (SortElement *)
- TclStackAlloc(interp, length * sizeof(SortElement));
+ elementArray = (SortElement *) ckalloc( length * sizeof(SortElement));
for (i=0; i < length; i++){
if (indexc) {
@@ -3762,7 +3761,7 @@ Tcl_LsortObjCmd(
}
done1:
- TclStackFree(interp, elementArray);
+ ckfree((char *)elementArray);
done:
if (sortInfo.sortMode == SORTMODE_COMMAND) {