RC_buggy_arches = 0


After the two updates in the previous post, I got further and eventually fixed the root of the remaining problems on ARM.

It appears I got on the wrong track at the very beginning of the investigation. My first test was to disable the JIT compiler during the tests, and it didn’t affect the result. I assumed from there that the JIT compiler was doing fine and wasn’t involved. Which led me to believe the alignment of the stack at 32-bits word boundary instead of 64-bits was a standard behaviour. I turns out my first test itself was wrong, because I hadn’t disabled the JIT compiler at all. You need to modify the runxpcshelltests.py script to disable the JIT, and not fiddle with the javascript.options.jit.chrome preference.

The JIT compiler was misaligning the stack, and disassembling the generated code leading to broken behaviour revealed that it was doing so when setting up arguments on the stack for function calls. While I was afraid this would be difficult to fix without changing a lot of code, and first only disabled the JIT compiler, it turns out the way nanojit works by compiling the last instructions first did make it straightforward to fix.

But ARM was not the only RC buggy architecture left after sparc and powerpc were fixed. MIPS remained. Alpha fails, too, but it is not a release architecture. Update: It appears hurd fails too, but like Alpha, it is not a release architecture.

So, while I didn’t want to wait 50 hours for a build, I managed to execute a failing test with the last xulrunner-1.9.1 packages that got built (before I enabled the test suite) under qemu. And I was able to track down the origin of the bug: the xpcom layer that translate function calls between languages doesn’t fill arguments correctly when they are smaller than 32 bits. While the code is adapted to the mipsel case, which is little endian, it doesn’t work on mips, which is big endian. I came up with a patch that should work, and which I hope won’t break mipsel as a consequence. All that is left to do is to build and test the fix. I hope someone else will be able to do that for me.

All in all except a release this week with a lot less red on the buildd status page.

2010-02-15 09:36:49+0900


You can leave a response, or trackback from your own site.

One Response to “RC_buggy_arches = 0”

  1. Fabian Says:

    Impressive! Thank you very much, your effort is highly appreciated.

Leave a Reply