hotspot/src/share/vm/asm/codeBuffer.cpp
changeset 360 21d113ecbf6a
parent 347 df859fcca515
child 670 ddf3e9583f2f
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Fri Apr 11 09:56:35 2008 -0400
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp	Sun Apr 13 17:43:42 2008 -0400
@@ -281,8 +281,10 @@
 
     // Need to return a pc, doesn't matter what it is since it will be
     // replaced during resolution later.
-    // (Don't return NULL or badAddress, since branches shouldn't overflow.)
-    return base;
+    // Don't return NULL or badAddress, since branches shouldn't overflow.
+    // Don't return base either because that could overflow displacements
+    // for shorter branches.  It will get checked when bound.
+    return branch_pc;
   }
 }