view patches/pr2553.patch @ 2803:242837e455da

S8087120, RH1206656, PR2553: [GCC5] java.lang.StackOverflowError on Zero JVM initialization on non x86 platforms. 2015-07-21 Andrew John Hughes <gnu_andrew@member.fsf.org> S8087120, RH1206656, PR2553: [GCC5] java.lang.StackOverflowError on Zero JVM initialization on non x86 platforms. * Makefile.am: (ICEDTEA_PATCHES): Add PR2553. * NEWS: Updated. * patches/pr2553.patch: Patch for PR2553 for the default HotSpot build.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Tue, 21 Jul 2015 22:15:21 +0100
parents
children
line wrap: on
line source

# HG changeset patch
# User sgehwolf
# Date 1434121785 -3600
#      Fri Jun 12 16:09:45 2015 +0100
# Node ID b19bc5aeaa099ac73ee8341e337a007180409593
# Parent  4ce44f68d86dcf88b27142e5ec031dec29d47d6f
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

diff -r 4ce44f68d86d -r b19bc5aeaa09 src/os_cpu/linux_zero/vm/os_linux_zero.cpp
--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	Sun Jul 19 18:19:32 2015 +0100
+++ openjdk/hotspot/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) {