src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/library_call.cpp Fri Aug 26 15:43:19 2016
--- new/src/share/vm/opto/library_call.cpp Fri Aug 26 15:43:19 2016
*** 2469,2478 ****
--- 2469,2500 ----
// the one that guards them: pin the Load node
p = make_load(control(), adr, value_type, type, adr_type, mo, LoadNode::Pinned, requires_atomic_access, unaligned, mismatched);
// load value
switch (type) {
case T_BOOLEAN:
+ {
+ // Normalize the value returned by getBoolean in the following cases
+ if (mismatched ||
+ heap_base_oop == top() || // - heap_base_oop is NULL or
+ (can_access_non_heap && alias_type->field() == NULL) // - heap_base_oop is potentially NULL
+ // and the unsafe access is made to large offset
+ // (i.e., larger than the maximum offset necessary for any
+ // field access)
+ ) {
+ IdealKit ideal = IdealKit(this);
+ #define __ ideal.
+ IdealVariable normalized_result(ideal);
+ __ declarations_done();
+ __ set(normalized_result, p);
+ __ if_then(p, BoolTest::ne, ideal.ConI(0));
+ __ set(normalized_result, ideal.ConI(1));
+ ideal.end_if();
+ final_sync(ideal);
+ p = __ value(normalized_result);
+ #undef __
+ }
+ }
case T_CHAR:
case T_BYTE:
case T_SHORT:
case T_INT:
case T_LONG:
src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File