Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 17 Aug 2011 14:18:04 -0400
From: Rich Felker <>
Subject: Re: Compilation error

On Wed, Aug 17, 2011 at 04:47:24PM +0200, Szabolcs Nagy wrote:
> * Rich Felker <> [2011-08-17 09:39:13 -0400]:
> > > (i'm not sure where alloca should go, pcc does not provide it)
> > 
> > WTF? alloca cannot be implemented as a function. Does gcc provide an
> > alloca function?
> > 
> i'm not sure how it should work but
> __alloca is defined in libpcc using simple asm trickery
> (modify stackpointer and the values on the stack and return)

This only works if there's a frame pointer and all automatic variable
access happens through the frame pointer. If the compiler generates
stack-pointer-relative accesses, it will break horribly. This is why
alloca really needs to be a builtin that the compiler is aware of (or
better yet, should not even exist...)


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.