alloca patch by Aron Rosenberg