Skip to content

Commit

Permalink
avoid the nullptr checks, this causes aserts in jtreg tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Jul 24, 2024
1 parent 6e063a1 commit 436648c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hotspot/share/runtime/frame.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "runtime/continuation.hpp"
#include "runtime/registerMap.hpp"
#include "runtime/stubRoutines.hpp"
#include "sanitizers/ub.hpp"
#include "utilities/macros.hpp"
#ifdef ZERO
# include "entryFrame_zero.hpp"
Expand Down Expand Up @@ -81,14 +82,15 @@ inline address frame::get_deopt_original_pc() const {
return nullptr;
}

ATTRIBUTE_NO_UBSAN
template <typename RegisterMapT>
inline address frame::oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const {
if (reg_map != nullptr && reg->is_reg()) {
if (reg->is_reg()) {
// If it is passed in a register, it got spilled in the stub frame.
return reg_map->location(reg, sp());
} else {
int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size;
if (reg_map != nullptr && reg_map->in_cont()) {
if (reg_map->in_cont()) {
return (address)((intptr_t)reg_map->as_RegisterMap()->stack_chunk()->relativize_usp_offset(*this, sp_offset_in_bytes));
}
address usp = (address)unextended_sp();
Expand Down

0 comments on commit 436648c

Please sign in to comment.