# HG changeset patch # User cjplummer # Date 1471291610 25200 # Node ID 7537c0ce2df30a23d843a14c9cde1461bb31f3b7 # Parent 1f2c47214988c9e0222f7d0787da4718aaedb363 8133749: os::current_frame() is not returning the proper frame on ARM and solaris-x64 Summary: Need to go up one extra frame to be consistent with other platforms. Reviewed-by: dholmes, zgu diff -r 1f2c47214988 -r 7537c0ce2df3 hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp --- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp Mon Aug 15 16:15:16 2016 +0200 +++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp Mon Aug 15 13:06:50 2016 -0700 @@ -292,15 +292,19 @@ frame os::current_frame() { intptr_t* fp = _get_current_fp(); // it's inlined so want current fp + // fp is for os::current_frame. We want the fp for our caller. frame myframe((intptr_t*)os::current_stack_pointer(), (intptr_t*)fp, CAST_FROM_FN_PTR(address, os::current_frame)); - if (os::is_first_C_frame(&myframe)) { + frame caller_frame = os::get_sender_for_C_frame(&myframe); + + if (os::is_first_C_frame(&caller_frame)) { // stack is not walkable frame ret; // This will be a null useless frame return ret; } else { - return os::get_sender_for_C_frame(&myframe); + // return frame for our caller's caller + return os::get_sender_for_C_frame(&caller_frame); } }