--- old/hotspot/src/share/vm/asm/codeBuffer.cpp 2009-08-01 04:09:26.944386251 +0100 +++ new/hotspot/src/share/vm/asm/codeBuffer.cpp 2009-08-01 04:09:26.858403750 +0100 @@ -2,7 +2,7 @@ #pragma ident "@(#)codeBuffer.cpp 1.100 07/05/05 17:05:03 JVM" #endif /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -284,8 +284,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; } } @@ -950,6 +952,7 @@ if (_comments != NULL) { CodeComment* c = _comments->find(offset); while (c && c->offset() == offset) { + stream->bol(); stream->print(" ;; "); stream->print_cr(c->comment()); c = c->next();