Skip to content

Commit 6861766

Browse files
committed
8332818: ubsan: archiveHeapLoader.cpp:70:27: runtime error: applying non-zero offset 18446744073707454464 to null pointer
Reviewed-by: stuefe, lucy
1 parent b818679 commit 6861766

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/hotspot/share/cds/archiveHeapLoader.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ ptrdiff_t ArchiveHeapLoader::_mapped_heap_delta = 0;
6161

6262
// Every mapped region is offset by _mapped_heap_delta from its requested address.
6363
// See FileMapInfo::heap_region_requested_address().
64+
#if defined(__clang__) || defined(__GNUC__)
65+
__attribute__((no_sanitize("undefined")))
66+
#endif
6467
void ArchiveHeapLoader::init_mapped_heap_info(address mapped_heap_bottom, ptrdiff_t delta, int dumptime_oop_shift) {
6568
assert(!_mapped_heap_relocation_initialized, "only once");
6669
if (!UseCompressedOops) {

0 commit comments

Comments
 (0)