mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-30 15:22:41 +00:00
8349554: [UBSAN] os::attempt_reserve_memory_between reported applying non-zero offset to non-null pointer produced null pointer
Reviewed-by: stefank, stuefe
This commit is contained in:
parent
7d52f1e64d
commit
8f6ccde982
@ -2017,7 +2017,7 @@ char* os::attempt_reserve_memory_between(char* min, char* max, size_t bytes, siz
|
||||
}
|
||||
|
||||
char* const hi_end = MIN2(max, absolute_max);
|
||||
if ((uintptr_t)hi_end < bytes) {
|
||||
if ((uintptr_t)hi_end <= bytes) {
|
||||
return nullptr; // no need to go on
|
||||
}
|
||||
char* const hi_att = align_down(hi_end - bytes, alignment_adjusted);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user