This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using alloca in function parameters buggy or works ???
- From: Jeffrey A Law <law at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, gcc at gcc dot gnu dot org
- Date: Thu, 16 Sep 2004 10:07:59 -0600
- Subject: Re: Using alloca in function parameters buggy or works ???
- Organization: Red Hat, Inc
- References: <200409161516.i8GFGOkV010784@caip.rutgers.edu> <jer7p22oks.fsf@sykes.suse.de>
- Reply-to: law at redhat dot com
On Thu, 2004-09-16 at 09:58, Andreas Schwab wrote:
> "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> 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