Mercurial > hg > truffle
diff src/cpu/x86/vm/stubGenerator_x86_64.cpp @ 4895:c742b0b47fe5
7119286: JSR292: SIGSEGV in JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c
Summary: unaligned stack in throw_NullPointerException_at_call_entry().
Reviewed-by: twisti, never, kvn
author | roland |
---|---|
date | Wed, 08 Feb 2012 09:52:24 +0100 |
parents | 22cee0ee8927 |
children | b522995d91f0 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/stubGenerator_x86_64.cpp Tue Feb 07 16:33:43 2012 -0800 +++ b/src/cpu/x86/vm/stubGenerator_x86_64.cpp Wed Feb 08 09:52:24 2012 +0100 @@ -2978,7 +2978,9 @@ int frame_complete = __ pc() - start; // Set up last_Java_sp and last_Java_fp - __ set_last_Java_frame(rsp, rbp, NULL); + address the_pc = __ pc(); + __ set_last_Java_frame(rsp, rbp, the_pc); + __ andptr(rsp, -(StackAlignmentInBytes)); // Align stack // Call runtime if (arg1 != noreg) { @@ -2997,7 +2999,7 @@ oop_maps->add_gc_map(__ pc() - start, map); - __ reset_last_Java_frame(true, false); + __ reset_last_Java_frame(true, true); __ leave(); // required for proper stackwalking of RuntimeStub frame