# HG changeset patch # User sgehwolf # Date 1434121785 -3600 # Node ID c6ef40024aa22ade9b735c2fad2fef44780170f0 # Parent 9f8038f83a6ee82fe7b8211dd46b4599b669eb17 8087120: [GCC5] java.lang.StackOverflowError on Zero JVM initialization on non x86 platforms. Summary: Use __builtin_frame_address(0) rather than returning address of local variable. Reviewed-by: dholmes diff -r 9f8038f83a6e -r c6ef40024aa2 src/os_cpu/linux_zero/vm/os_linux_zero.cpp --- a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Tue Nov 17 09:39:45 2015 -0800 +++ b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Fri Jun 12 16:09:45 2015 +0100 @@ -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) {