Skip to content

Commit

Permalink
ReservedHeapSpace::try_reserve_range remove the ubsan disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Dec 12, 2024
1 parent 89b7b72 commit 5ac1704
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hotspot/share/memory/virtualspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ void ReservedHeapSpace::try_reserve_heap(size_t size,
}
}

ATTRIBUTE_NO_UBSAN
void ReservedHeapSpace::try_reserve_range(char *highest_start,
char *lowest_start,
size_t attach_point_alignment,
Expand All @@ -459,7 +458,7 @@ void ReservedHeapSpace::try_reserve_range(char *highest_start,
while (attach_point >= lowest_start &&
attach_point <= highest_start && // Avoid wrap around.
((_base == nullptr) ||
(_base < aligned_heap_base_min_address || _base + size > upper_bound))) {
(_base < aligned_heap_base_min_address || size > (uintptr_t)(upper_bound - _base)))) {
try_reserve_heap(size, alignment, page_size, attach_point);
attach_point -= stepsize;
}
Expand Down

0 comments on commit 5ac1704

Please sign in to comment.