< prev index next > src/hotspot/share/code/compiledMethod.cpp
pd->return_oop());
}
address CompiledMethod::oops_reloc_begin() const {
// If the method is not entrant or zombie then a JMP is plastered over the
- // first few bytes. If an oop in the old code was there, that oop
- // should not get GC'd. Skip the first few bytes of oops on
- // not-entrant methods.
- address low_boundary = verified_entry_point();
- if (!is_in_use() && is_nmethod()) {
- low_boundary += NativeJump::instruction_size;
- // %%% Note: On SPARC we patch only a 4-byte trap, not a full NativeJump.
- // This means that the low_boundary is going to be a little too high.
- // This shouldn't matter, since oops of non-entrant methods are never used.
- // In fact, why are we bothering to look at oops in a non-entrant method??
- }
- return low_boundary;
+ // first few bytes. Therefore, we do not allow an oop in the first
+ // NativeJump::instruction_size after the verified entry. Since the
+ // frame is being built in this path, that guarantees such oops can not
+ // exist until the frame is completed, which should be strictly later.
+ return MAX2(code_begin() + frame_complete_offset(),
+ verified_entry_point() + NativeJump::instruction_size);
}
int CompiledMethod::verify_icholder_relocations() {
ResourceMark rm;
int count = 0;
< prev index next >