changeset 6343:08b2ebf152c2 icedtea-2.7.0pre02

8087120, RH1206656, PR2553: [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
author sgehwolf
date Fri, 12 Jun 2015 16:09:45 +0100
parents 92c035dad644
children a0792005b3eb
files src/os_cpu/linux_zero/vm/os_linux_zero.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	Wed Sep 09 00:28:30 2015 +0100
+++ b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	Fri Jun 12 16:09:45 2015 +0100
@@ -61,8 +61,8 @@
 #endif
 
 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) {