mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
3696edeb1e
This was causing crashes on 32-bit OS X continuations=true builds. There were two important differences between vmInvoke and vmJumpAndInvoke: (1) vmInvoke expects its stack to be aligned on entry, modulo the return address whereas the stack argument to vmJumpAndInvoke is aligned without allowing for the return address, and (2) vmInvoke pushes EBP before doing its frame allocation, whereas vmJumpAndInvoke did not take that into account. So in order for vmJumpAndInvoke to allocate the exact same frame size that vmInvoke would have when calling the same method, it needed to add an extra two words beyond what it was already allocating. Aside from alignment concerns, the code is not particularly sensitive to vmJumpAndInvoke allocating a different frame size than vmInvoke, since we store the frame pointer in a "thread local" variable: // remember this stack position, since we won't be able to rely on // %rbp being restored when the call returns movl 8(%ebp),%eax movl %esp,TARGET_THREAD_SCRATCH(%eax) ... GLOBAL(vmInvoke_returnAddress): // restore stack pointer movl TARGET_THREAD_SCRATCH(%ebx),%esp My original patch makes an equivalent change for the 64-bit changes, but I'll leave that for after we release 1.0 since we're in bugfix-only mode right now |
||
---|---|---|
.. | ||
android | ||
avian | ||
codegen | ||
heap | ||
lzma | ||
openjdk | ||
system | ||
tools | ||
util | ||
arm.masm | ||
arm.S | ||
boot-javahome.cpp | ||
boot.cpp | ||
bootimage-fields.cpp | ||
bootimage-template.cpp | ||
builtin.cpp | ||
classpath-android.cpp | ||
classpath-avian.cpp | ||
classpath-openjdk.cpp | ||
compile-arm.masm | ||
compile-arm.S | ||
compile-x86.masm | ||
compile-x86.S | ||
compile.cpp | ||
continuations-x86.S | ||
embed.cpp | ||
embedded-loader.cpp | ||
finder.cpp | ||
heapdump.cpp | ||
heapwalk.cpp | ||
interpret.cpp | ||
jnienv.cpp | ||
lzma-decode.cpp | ||
lzma-encode.cpp | ||
machine.cpp | ||
main.cpp | ||
powerpc-regs.S | ||
process.cpp | ||
thunks.cpp | ||
types.def | ||
util.cpp | ||
x86.masm | ||
x86.S |