Using alloca in function parameters buggy or works ???

Dave Korn dk@artimi.com
Thu Sep 16 16:36:00 GMT 2004


> -----Original Message-----
> From: gcc-owner On Behalf Of Jeffrey A Law
> Sent: 16 September 2004 17:08

> On Thu, 2004-09-16 at 09:58, Andreas Schwab wrote:
> > "Kaveh R. Ghazi" writes:
> > 
> > > 2.  Does my example above trigger the bug?
> > 
> > I think the problem was that alloca'ing the memory could get mixed
> > together with parameter passing (when they are passed on 
> stack).  So it
> > probably depends on the order the parameters are set up and 
> whether the
> > alloca'd memory is the first parameter pushed on stack.
> It also probably depends on the types of the other parameters
> (consider parameters which must be constructed on the stack).
> 
> jeff



  And how about calling alloca in a varargs function that has an eliminated
frame pointer and incoming args space?  That could be a good way to expose
latent bugs...... <g>


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Gcc mailing list