APPROVE COMMIT 21.4
Steve Youngs <steve(a)sxemacs.org> writes:
Hi Vin!
This patch fixes a stack overflow bug in mapconcat. The recipe to
reproduce the bug is...
(let ((str (make-string 1600000 ?x)))
(mapconcat
#'(lambda (el)
el)
(list str) ""))
21.4 patch:
ChangeLog files diff command: cvs -q diff -U 0
Files affected: src/ChangeLog
Source files diff command: cvs -q diff -uN
Files affected: src/fns.c
Index: src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.290.2.113
diff -u -p -U0 -r1.290.2.113 ChangeLog
--- src/ChangeLog 20 Nov 2006 18:29:42 -0000 1.290.2.113
+++ src/ChangeLog 7 Dec 2006 17:58:48 -0000
@@ -0,0 +1,8 @@
+2006-12-08 Nelson Ferreira <njsf(a)sxemacs.org>
+
+ * src/fns.c (XMALLOC_OR_ALLOCA,free_malloced_ptr,XMALLOC_UNBIND):
+ relocated the definitions to be used sooner in file.
+ (concat,plists_differ,mapcar1,Fmapconcat,Fmapcar): Use
+ XMALLOC_OR_ALLOCA macro instead of alloca to prevent stack
+ overflow.
Hi Steve and Nelson,
Thanks for the patch. The number of chars I had to put in the string
differed, but I did eventually see a real crash. This patch has been
committed and will appear in the soon-to-be-released 21.4.20,
"Double Solitaire".
- Vin
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches