[webkit-dev] Alignment issues in MIPS

Alex Vazquez alexvazquezfente at gmail.com
Tue Apr 6 23:33:39 PDT 2010


2010/4/6 Luciano Montanaro <mikelima at gmail.com>

> On Tue, Apr 6, 2010 at 9:21 AM, Alex Vazquez <alexvazquezfente at gmail.com>
> wrote:
> > Hello list,
> >
> > I'm cross-compiling WebKit (revision 40084) for a MIPS board using
> DirectFB
> > backend.
> >
> > While executing in the target, libwebkit is causing SIGBUS errors due to
> > misaligned double data. The errors raise when loading a misaligned double
> in
> > the FPU using the ldc1 instruction (it is stated in the MIPS
> documentation
> > that data loaded in the FPU must be 8-byte aligned to avoid an address
> > error). I know that the kernel can be configured to manage misaligned
> > accesses but i prefer not to mess with that by the moment.
>
> I have SIGBUS problems cross-compiling on SH4 with Qt, similar to yours.
> Debug builds work fine, but release builds crash as soon as the first
> webkit-related
> call is made. I've not had time to investigate further, though I'll
> soon have to.
>
> I'm looking into your suggestion, and I see the class is not
> optimallly laid out (there is a function pointer which is presumably 4
> bytes, followed by a double which is 8), though the compiler should
> correctly align it putting a 4 byte hole between the pointer and the
> double. At new time, the class should be allocated from a correctly
> aligned memory block, so any misalignments are probably due to copying
> the class around?
>
>
Yes, it seems to be unaligned anywhere else in the code. I'll try to find
where and report back.

Regards,


>
>
> --
> Luciano Montanaro
>
> Anyone who is capable of getting themselves made President should on
> no account be allowed to do the job. -- Douglas Adams
>



-- 
Alejandro Vazquez Fente
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100407/2664e745/attachment.html>


More information about the webkit-dev mailing list