--- jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2015-06-10 10:06:49.485230587 +0200 +++ jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2015-06-10 10:07:33.645229254 +0200 @@ -55,8 +55,8 @@ #include "utilities/vmError.hpp" address os::current_stack_pointer() { - address dummy = (address) &dummy; - return dummy; + // return the address of the current function + return (address)__builtin_frame_address(0); } frame os::get_sender_for_C_frame(frame* fr) {