[U-Boot] EABI 4.2

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Mar 10 17:35:51 CET 2010


>
> Andrew Dyer wrote on Wednesday, March 10, 2010 4:50 PM:
[SNIP]
>
> Hm, on the wikipedia article for the 'variable length arrays' (VLA) I
> read, that the GNU C compiler always uses the stack for this type of
> variables. So I think, if the stack is working for all other local
> variables, it should not be an memory layout problem.
>
> Eventually the following might be interesting. I have tried to make the
> VLA much bigger, to eliminate 'normal' buffer overrun problems:
>
> char filename[dirent.namelen + 1 + 2048]
>
> But this leads to the same result, U-Boot dies. With an fixed length
> array of comparable length it works:
>
> char filename[2048]
>
> Both (local) variables should end up on the stack.

Try alloca to see if stack allocs works at all in your toolchain.

      Jocke



More information about the U-Boot mailing list