Wed, 17 Oct 2018 16:31:25 -0400
8211394: CHECK_ must be used in the rhs of an assignment statement within a block
Summary: Backport from JDK12
Reviewed-by: dholmes
src/share/vm/classfile/verificationType.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/utilities/exceptions.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/classfile/verificationType.cpp Tue Oct 16 16:08:14 2018 +0100 1.2 +++ b/src/share/vm/classfile/verificationType.cpp Wed Oct 17 16:31:25 2018 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -99,7 +99,7 @@ 1.11 VerificationType comp_from = from.get_component(context, CHECK_false); 1.12 if (!comp_this.is_bogus() && !comp_from.is_bogus()) { 1.13 return comp_this.is_assignable_from(comp_from, context, 1.14 - from_field_is_protected, CHECK_false); 1.15 + from_field_is_protected, TRAPS); 1.16 } 1.17 } 1.18 return false;
2.1 --- a/src/share/vm/utilities/exceptions.hpp Tue Oct 16 16:08:14 2018 +0100 2.2 +++ b/src/share/vm/utilities/exceptions.hpp Wed Oct 17 16:31:25 2018 -0400 2.3 @@ -201,7 +201,7 @@ 2.4 // 2.5 // CAUTION: make sure that the function call using a CHECK macro is not the only statement of a 2.6 // conditional branch w/o enclosing {} braces, since the CHECK macros expand into several state- 2.7 -// ments! 2.8 +// ments! Also make sure it is not used on a function call that is part of a return statement! 2.9 2.10 #define PENDING_EXCEPTION (((ThreadShadow*)THREAD)->pending_exception()) 2.11 #define HAS_PENDING_EXCEPTION (((ThreadShadow*)THREAD)->has_pending_exception())