Skip to content

Commit

Permalink
Ensure consistency between resolved method and symbol wrt isInterpreted
Browse files Browse the repository at this point in the history
In a relocatable compilation, if the resolved method denotes an
interpreted method, ensure that the resolved method symbol also denotes
it is interpreted.

Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
  • Loading branch information
dsouzai committed Apr 8, 2021
1 parent 77cea00 commit ebeac7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/il/OMRResolvedMethodSymbol.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2020 IBM Corp. and others
* Copyright (c) 2000, 2021 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 @@ -157,15 +157,17 @@ OMR::ResolvedMethodSymbol::ResolvedMethodSymbol(TR_ResolvedMethod * method, TR::
//
if ((_methodIndex > JITTED_METHOD_INDEX && !_resolvedMethod->isSameMethod(comp->getJittedMethodSymbol()->getResolvedMethod()))
|| comp->isDLT()
|| (comp->getOption(TR_UseSymbolValidationManager) && comp->compileRelocatableCode()))
|| comp->compileRelocatableCode())
{
if (_resolvedMethod->isInterpreted())
{
self()->setInterpreted();
self()->setMethodAddress(_resolvedMethod->resolvedMethodAddress());
}
else
{
self()->setMethodAddress(_resolvedMethod->startAddressForJittedMethod());
}
}

if (!_resolvedMethod->isJNINative())
Expand Down

0 comments on commit ebeac7b

Please sign in to comment.