-
Notifications
You must be signed in to change notification settings - Fork 30
SIGSEGV in boostrap classloader on x86-64 #34
Comments
I see the exact same problem with GCC 4.6.3 when trying to launch JRuby which means GCC version doesn't really make a difference.
I see the same problem with |
Launching JRuby with
|
Looking at the stack trace and the stack alignment check error, we first enter This seems to point to exception handling not cleaning up the stack properly somewhere on x86-64. |
It turns out that with GCC 4.7.2 no exception is throw. The last invoked method is decode():
which suggest that the generated code for that method is broken on x86-64. |
Evidence points to On 32-bit, we have this:
But on 64-bit, we have this:
As the instruction selectors look pretty much identical, it's likely that |
Table 2-5 ("Special Cases of REX Encodings") of Intel manual states that: EBP without a displacement must be done using mod = 01 with displacement of 0. The problem is visible on x86-64 where INSN_JMP_MEMINDEX is encoded wrong. This fixes issue jatovm#34. Signed-off-by: Pekka Enberg <penberg@kernel.org>
Using GCC 4.7.2-2 from Fedora 17:
I'm seeing the following SIGSEGV during early bootstrap classloading which is not visible with older GCC from Fedora 16:
Decoding the trapping instruction:
Indicates that the %rdx register is clobbered.
Valgrind reports the following:
where the code that calls %rdx is:
which is class initializer trampoline:
The text was updated successfully, but these errors were encountered: