[Ecls-list] Problem in compiled code with nargs > 64
goffioul at imec.be
Tue Apr 25 01:48:01 UTC 2006
> Still trying to make CMN work with ECL, I succeeded in
> interpreted form, thanks to recent changes. However, I get a
> segmentation fault in compiled form.
> Itracked down the problem and the crash occurs when loading
> the compiled cmn0.fasl file at a cl_list() call with 73
> arguments (it corresponds to a class definition with a lot of
> slots). When I follow the code:
> 1) cl__va_start() sets up the args object, but sets the stack pointer
> (sp) to a
> negative number (cl_stack_index() => 10 and args.narg =>
> 73); however, the stack pointer is an unsigned int, so it is
> actually set to a very large number, due to underflow
> 2) at the first cl_va_arg() call, the code tries to access
> cl_env.stack[args.sp++] and segfaults; indeed the computed
> index is very large due to unsigned underflow from step 1.
The attached file reproduces the problem.
Compile and load the FAS file.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 622 bytes
More information about the ecl-devel