mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8173151: Code heap corruption due to incorrect inclusion test
Change inclusion test to use CodeBlob::code_begin() for AOT methods and start of CodeBlob otherwise. Added regression test. Reviewed-by: thartmann, dlong, kvn
This commit is contained in:
parent
7b93ee904b
commit
ecee7fc84b
7 changed files with 113 additions and 6 deletions
|
@ -417,7 +417,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, int code_blob_type)
|
|||
CodeHeap* CodeCache::get_code_heap(const CodeBlob* cb) {
|
||||
assert(cb != NULL, "CodeBlob is null");
|
||||
FOR_ALL_HEAPS(heap) {
|
||||
if ((*heap)->contains(cb->code_begin())) {
|
||||
if ((*heap)->contains_blob(cb)) {
|
||||
return *heap;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue