mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6777083: assert(target != __null,"must not be null")
Reviewed-by: iveresov, kvn
This commit is contained in:
parent
642c26950d
commit
1a5a2ecd25
3 changed files with 26 additions and 14 deletions
|
@ -703,6 +703,10 @@ class Relocation VALUE_OBJ_CLASS_SPEC {
|
|||
assert(datalen()==0 || type()==relocInfo::none, "no data here");
|
||||
}
|
||||
|
||||
static bool is_reloc_index(intptr_t index) {
|
||||
return 0 < index && index < os::vm_page_size();
|
||||
}
|
||||
|
||||
protected:
|
||||
// Helper functions for pack_data_to() and unpack_data().
|
||||
|
||||
|
@ -1127,6 +1131,12 @@ class external_word_Relocation : public DataRelocation {
|
|||
return rh;
|
||||
}
|
||||
|
||||
// Some address looking values aren't safe to treat as relocations
|
||||
// and should just be treated as constants.
|
||||
static bool can_be_relocated(address target) {
|
||||
return target != NULL && !is_reloc_index((intptr_t)target);
|
||||
}
|
||||
|
||||
private:
|
||||
address _target; // address in runtime
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue