chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #910: Failure with many arguments on amd64


From: Chicken Trac
Subject: Re: [Chicken-janitors] #910: Failure with many arguments on amd64
Date: Sun, 02 Sep 2012 11:54:38 -0000

#910: Failure with many arguments on amd64
-----------------------------+----------------------------------------------
  Reporter:  sjamaan         |       Owner:  felix   
      Type:  defect          |      Status:  assigned
  Priority:  critical        |   Milestone:  4.9.0   
 Component:  core libraries  |     Version:  4.8.x   
Resolution:                  |    Keywords:          
-----------------------------+----------------------------------------------

Comment(by sjamaan):

 Replying to [comment:7 felix]:
 > This looks the call is already exceeding the allowed parameter limit
 (AFAIK, the C standard just allows a handful, passing a very large number
 of arguments to a C function may result in undefined behaviour),
 particularly because it calls a vararg function. This seems simply to be a
 limitation of the x86-64 ABI.

 Hm, this is interesting.  It looks like only 127 arguments are guaranteed
 by the C spec.  However, a simple test program using the same GCC compiler
 gave me no error.  Also, I think the C compiler should give a warning or
 error when trying to compile a call containing more arguments than the
 compiler (or its target platform) can handle. But then again, it's C....

 > I see no fix besides introducing a static limit, in other words: give a
 warning or error when compiling a call with more than (say) 1024
 arguments.

 I was thinking about possibly just compiling this to the equivalent of
 {{(apply make-me-a-list args)}}, so using do_apply instead of a direct
 call.  This might get around any C compiler limits (but of course not ABI
 limitations).

 However, I'm not convinced that's really the problem (since the test
 program just worked...).  Limiting the number of arguments to Scheme
 procedures doesn't sound very appealing either.

 > I also think this is not relevant to 4.8.0, as there isn't much that can
 be done about it.

 I agree, let's just get on with this release.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/910#comment:8>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]