APPROVE COMMIT 21.4
Thanks for the patch, Aidan and thanks for the commentary, everyone.
This patch has been committed with the ChangeLog entry below and will
appear in the soon-to-be-released 21.4.20.
2006-07-31 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecode.c: Use xnew_array instead of alloca.
Vin Shelton <acs(a)xemacs.org> writes:
Does anyone think the below patch will have a noticeable effect on
the speed byte compiler? Barring any concerns, I will check this in for
Aidan Kehoe <kehoea(a)parhasard.net> writes:
> Ar an t-aonÃº lÃ¡ is triochad de mÃ IÃºil, scrÃobh Stephen J. Turnbull:
> > The code at bytecode.c:1627 is the last line calling alloca_array
> > below. I wonder if maybe the compiler doesn't like the local
> > declaration of struct jump in the middle of the declarations with
> > initializations, or maybe either the compiler or cygwin.dll just
> > doesn't handle alloca_array as we expect.
> Thatâs it--itâs a mundane stack overflow. The length of the instructions
> string is 79648, we try to allocate twice that (= 160k) on the stack,
> Windows refuses. Mule-UCS is horrible code.
> The below makes (require 'un-define) work for me. Iâm not sure that it
> doesnât leak memory in the various error cases, unhappily.
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/bytecode.c,v
retrieving revision 188.8.131.52
diff -u -r184.108.40.206 bytecode.c
--- bytecode.c 2005/01/31 02:55:04 220.127.116.11
+++ bytecode.c 2006/07/31 10:36:05
＠＠ -1624,7 +1624,7 ＠＠
- struct jump * const jumps = alloca_array (struct jump, comfy_size);
+ struct jump * const jumps = xnew_array (struct jump, comfy_size);
struct jump *jumps_ptr = jumps;
Opbyte *program_ptr = program;
＠＠ -1868,6 +1868,7 ＠＠
/* *program_ptr++ = 0; */
*program_length = program_ptr - program;
/* Optimize the byte code and store the optimized program, only
> Santa Maradona, priez pour moi!