提交 bd2fda97 编写于 作者: K kvn

6876037: CTW fails jdk7/hotspot/src/share/vm/opto/type.cpp:2055....

6876037: CTW fails jdk7/hotspot/src/share/vm/opto/type.cpp:2055. assert(bits,"Use TypePtr for NULL")
Summary: Add missing 0 value check in TypeRawPtr::add_offset().
Reviewed-by: never
上级 20b5c92f
/* /*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -2187,8 +2187,11 @@ const TypePtr *TypeRawPtr::add_offset( intptr_t offset ) const { ...@@ -2187,8 +2187,11 @@ const TypePtr *TypeRawPtr::add_offset( intptr_t offset ) const {
case TypePtr::NotNull: case TypePtr::NotNull:
return this; return this;
case TypePtr::Null: case TypePtr::Null:
case TypePtr::Constant: case TypePtr::Constant: {
return make( _bits+offset ); address bits = _bits+offset;
if ( bits == 0 ) return TypePtr::NULL_PTR;
return make( bits );
}
default: ShouldNotReachHere(); default: ShouldNotReachHere();
} }
return NULL; // Lint noise return NULL; // Lint noise
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册