-
Notifications
You must be signed in to change notification settings - Fork 6.3k
8360941: [ubsan] MemRegion::end() shows runtime error: applying non-zero offset 8388608 to null pointer #26216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
e2407fd
d31a4f3
850e92d
f325d87
842077a
f0888ce
0a9adaa
53d20a2
bf78338
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,11 @@ TEST_OTHER_VM(G1FreeRegionList, length) { | |
|
||
// Create a fake heap. It does not need to be valid, as the G1HeapRegion constructor | ||
// does not access it. | ||
MemRegion heap(nullptr, num_regions_in_test * G1HeapRegion::GrainWords); | ||
const size_t szw = num_regions_in_test * G1HeapRegion::GrainWords; | ||
const size_t sz = szw * BytesPerWord; | ||
const size_t lpsz = os::large_page_size(); | ||
char* addr = os::reserve_memory_aligned(sz, lpsz, mtTest); | ||
MemRegion heap((HeapWord*)addr, szw); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So far as I can tell, there's no guarantee that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too bad the only way to find out about that alignment behavior is to dig into the sources for all ports |
||
|
||
// Allocate a fake BOT because the G1HeapRegion constructor initializes | ||
// the BOT. | ||
|
@@ -87,5 +91,6 @@ TEST_OTHER_VM(G1FreeRegionList, length) { | |
|
||
bot_storage->uncommit_regions(0, num_regions_in_test); | ||
delete bot_storage; | ||
os::release_memory(addr, szw); | ||
|
||
FREE_C_HEAP_ARRAY(HeapWord, bot_data); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MBaesken you want to align the start address at region size; not sure the G1 code we call in this test cares, but it might.