Request for reviews (M): 7145346: VerifyStackAtCalls is broken

Vladimir Kozlov vladimir.kozlov at
Thu Feb 16 11:47:28 PST 2012

Tom Rodriguez wrote:
> On Feb 16, 2012, at 11:04 AM, Vladimir Kozlov wrote:
>> 7145346: VerifyStackAtCalls is broken
>> A lot of duplicated code was removed.
> Very nice.  In chaitin.cpp, regs_per_slot can be replaced with VMRegImpl::slots_per_word.


>> The failure was due to an incorrect branch distance was used in call_epilog(). Replace it's encoding with macroassembler use. Moved duplicated code to
>> After that fix I found an other problem - return_addr() definition in .ad files was not taking into account EBP save.
> What kind of bug could that lead to?  Or does it just work out to be benign?

Incorrect return_pc passed to OptoRuntime::rethrow_C() with -XX:+VerifyStackAtCalls.


# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (/net/
rc/share/vm/runtime/sharedRuntime.cpp:501), pid=28761, tid=2
#  assert(frame::verify_return_pc(return_address)) failed: must be a return addr
ess: 0xffffffffbadb100d
# JRE version: 6.0_22-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b15-internal-jvmg compiled mo
de solaris-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumpi
ng, try "ulimit -c unlimited" before starting Java again
# If you would like to submit a bug report, please visit:

---------------  T H R E A D  ---------------

Current thread (0x000000000042b000):  JavaThread "main" [_thread_in_Java, id=2,

Stack: [0xfffffcfffef9f000,0xfffffcffff09f000],  sp=0xfffffcffff09d9c0,  free sp
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  []  void VMError::report(outputStream*)+0x1304
V  []  void VMError::report_and_die()+0x9b0
V  []  void report_vm_error(const char*,int,const char*,const
V  []  unsigned char*SharedRuntime::raw_exception_handler_for
_return_address(JavaThread*,unsigned char*)+0x97
V  []  unsigned char*OptoRuntime::rethrow_C(oopDesc*,JavaThre
ad*,unsigned char*)+0xf3

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v  ~RuntimeStub::_rethrow_Java
J  java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;
J  sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Cla
J  java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;
v  ~StubRoutines::call_stub

> tom
>> Used in_preserve_stack_slots() value which is correctly defined. Also fixed frame dump for OptoAssembly output (in chaitin.cpp).
>> Thanks,
>> Vladimir

More information about the hotspot-compiler-dev mailing list