[webkit-dev] stack alignment bug

Zoltan Herczeg zherczeg at inf.u-szeged.hu
Wed Jun 3 04:35:57 PDT 2009


true, some architectures have strict policies for stack handling. Perhaps
the worst one is PowerPC with its organized stack frame (back chains,
pre-defined register save areas, etc). I think a fake stack pointer for
JIT can solve the x86 compatibility problem.

1) allocate enough aligned stack space for the worst case when you enter
to JIT
2) the fake stack pointer should use this pre-allocated stack frame.


> I don't know how to file bug so I posted here.
> In privateCompileCTIMachineTrampolines() there are multiple align() to
> align code on 16byte margin, yet, the stack can be put on 32bit margin
> that causes crush.
> Suppose original stack is aligned to 8/16bytes, the above function
> frequently pop/push regT3 that makes stack mis-aligned. Then int to double
> conversion uses stack that will fail.
> rgds
> joe

More information about the webkit-dev mailing list