Skip to content

Commit

Permalink
Merge pull request #8243 from dsouzai/fixSCCAssert_0.18
Browse files Browse the repository at this point in the history
Check if pointer is in SCC before loading it (0.18.0)
  • Loading branch information
mpirvu committed Jan 8, 2020
2 parents 063cf17 + 8c27390 commit 49bc31c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions runtime/compiler/runtime/IProfiler.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -3145,7 +3145,12 @@ TR_IPBCDataCallGraph::loadFromPersistentCopy(TR_IPBCDataStorageHeader * storage,
{
if (store->_csInfo.getClazz(i))
{
J9Class *ramClass = ((TR_J9VM *)comp->fej9())->matchRAMclassFromROMclass((J9ROMClass *)comp->fej9()->sharedCache()->pointerFromOffsetInSharedCache(store->_csInfo.getClazz(i)), comp);
J9Class *ramClass = NULL;

uintptrj_t csInfoClazz = store->_csInfo.getClazz(i);
if (comp->fej9()->sharedCache()->isPointerInSharedCache((void *)csInfoClazz))
ramClass = ((TR_J9VM *)comp->fej9())->matchRAMclassFromROMclass((J9ROMClass *)comp->fej9()->sharedCache()->pointerFromOffsetInSharedCache(csInfoClazz), comp);

if (ramClass)
{
_csInfo.setClazz(i, (uintptrj_t)ramClass);
Expand Down

0 comments on commit 49bc31c

Please sign in to comment.