summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-03-14 19:46:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-03-14 19:46:15 (GMT)
commit13a258e3cb2d255dedbc5e2ef9b4815de4823ae0 (patch)
tree3d4881c6e9ade447ffa32c294e01fc2731b28dfa /generic/tclCmdIL.c
parent50bb2f9aeb42d763d30333fbb8e053d9a5dc72e8 (diff)
downloadtcl-13a258e3cb2d255dedbc5e2ef9b4815de4823ae0.zip
tcl-13a258e3cb2d255dedbc5e2ef9b4815de4823ae0.tar.gz
tcl-13a258e3cb2d255dedbc5e2ef9b4815de4823ae0.tar.bz2
* generic/tclCmdIL.c (Tcl_LsortObjCmd): Use ckalloc() to allocate
SortElement arrays instead of TclStackAlloc() which isn't getting alignment right. Workaround for [Bug 1914503].
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c7
1 files changed, 3 insertions, 4 deletions
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) {