Skip to content

Commit

Permalink
Disable callerClassLoader optimization under AOT
Browse files Browse the repository at this point in the history
Previously, j/l/ClassLoader.callerClassLoader was optimized during IL
generation if it was inlined into a method which itself was inlined into
another method. Under these circumstances, the address of the calling
method's class loader would be hardcoded into the instruction stream.
This causes problems under AOT, since the address of the caller's class
loader was not being properly relocated. Since there is not yet any
relocation that could handle this, this particular optimization has been
disabled under AOT for the time being.

Signed-off-by: Ben Thomas <[email protected]>
  • Loading branch information
aviansie-ben committed Feb 13, 2019
1 parent 99e024a commit 001ad85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/compiler/ilgen/IlGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ bool TR_J9ByteCodeIlGenerator::internalGenIL()
fej9()->stackWalkerMaySkipFrames(caller1->getPersistentIdentifier(),callerClass1));


if (doIt)
if (doIt && !comp()->compileRelocatableCode())
{
if (recognizedMethod == TR::java_lang_ClassLoader_callerClassLoader
)
Expand Down

0 comments on commit 001ad85

Please sign in to comment.