Skip to content

Commit

Permalink
Disable side-effect guards under read only code cache
Browse files Browse the repository at this point in the history
Side-effect guards can require runtime assumptions that have to patch
the code, which is not allowed. Therefore, disable the generation of
side-effect guards until such time as the runtime assumptions can patch
a write-able data area, rather than the code cache.

Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
  • Loading branch information
dsouzai committed Sep 15, 2020
1 parent 94f7e54 commit 3836308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/optimizer/VPHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9193,7 +9193,7 @@ static TR::Node *constrainIfcmpeqne(OMR::ValuePropagation *vp, TR::Node *node, b
}
}

if (clazzToBeInitialized &&
if (!vp->comp()->getGenerateReadOnlyCode() && clazzToBeInitialized &&
(((clazzNameLen == 35) && !strncmp(clazzToBeInitialized, "Lcom/ibm/ejs/ras/TraceEnabledToken;", clazzNameLen)) ||
((clazzNameLen == 41) && !strncmp(clazzToBeInitialized, "Lcom/ibm/websphere/ras/TraceEnabledToken;", clazzNameLen)) ||
((clazzNameLen == 40) && !strncmp(clazzToBeInitialized, "Ljava/lang/String$StringCompressionFlag;", clazzNameLen))) &&
Expand Down

0 comments on commit 3836308

Please sign in to comment.