mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8286876: NMT.test_unaliged_block_address_vm_assert fails if using clang toolchain
Reviewed-by: stuefe, gziemski
This commit is contained in:
parent
d097b5e628
commit
7b6ac41ab1
6 changed files with 51 additions and 30 deletions
|
@ -114,7 +114,10 @@ class MallocHeader {
|
|||
uint16_t get_footer() const { return build_footer(footer_address()[0], footer_address()[1]); }
|
||||
void set_footer(uint16_t v) { footer_address()[0] = v >> 8; footer_address()[1] = (uint8_t)v; }
|
||||
|
||||
public:
|
||||
template<typename InTypeParam, typename OutTypeParam>
|
||||
inline static OutTypeParam resolve_checked_impl(InTypeParam memblock);
|
||||
|
||||
public:
|
||||
// Contains all of the necessary data to to deaccount block with NMT.
|
||||
struct FreeInfo {
|
||||
const size_t size;
|
||||
|
@ -140,10 +143,15 @@ class MallocHeader {
|
|||
// an option pointer to the corruption in p_corruption, and return false.
|
||||
// Return true if block is fine.
|
||||
inline bool check_block_integrity(char* msg, size_t msglen, address* p_corruption) const;
|
||||
// Check correct alignment and placement of pointer, fill in short descriptive text and return false
|
||||
// if this is not the case.
|
||||
// Returns true if the memblock looks OK.
|
||||
inline static bool is_valid_malloced_pointer(const void* payload, char* msg, size_t msglen);
|
||||
|
||||
// If block is broken, print out a report to tty (optionally with
|
||||
// hex dump surrounding the broken block), then trigger a fatal error
|
||||
inline void assert_block_integrity() const;
|
||||
inline static const MallocHeader* resolve_checked(const void* memblock);
|
||||
inline static MallocHeader* resolve_checked(void* memblock);
|
||||
};
|
||||
|
||||
// This needs to be true on both 64-bit and 32-bit platforms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue