Skip to content

Commit

Permalink
Make calltrace calculation more resilient to null values.
Browse files Browse the repository at this point in the history
  • Loading branch information
teshull committed Jan 22, 2024
1 parent abc1684 commit 3010d75
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void initialize(Set<AnalysisMethod> registeredRoots) {
for (AnalysisMethod callee : invokeInfo.getAllCallees()) {
if (SubstrateCompilationDirectives.isRuntimeCompiledMethod(callee)) {
MethodNode calleeMethodNode = analysisMethodMap.get(callee);
if (calleeMethodNode.trace == null) {
if (calleeMethodNode != null && calleeMethodNode.trace == null) {
/*
* If this was the first time this node was reached, then add to
* worklist.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,13 +568,11 @@ public void reportAnalysisError(AnalysisUniverse aUniverse, Throwable t) {

checkMaxRuntimeCompiledMethods(treeInfo);

boolean foundError = false;
if (t instanceof ParallelExecutionException exception) {
for (var e : exception.getExceptions()) {
if (e instanceof AnalysisError.ParsingError parsingError) {
AnalysisMethod errorMethod = parsingError.getMethod();
if (errorMethod.isDeoptTarget() || SubstrateCompilationDirectives.isRuntimeCompiledMethod(errorMethod)) {
foundError = true;
AnalysisMethod failingRuntimeMethod = null;
if (SubstrateCompilationDirectives.isRuntimeCompiledMethod(errorMethod)) {
failingRuntimeMethod = errorMethod;
Expand All @@ -593,10 +591,6 @@ public void reportAnalysisError(AnalysisUniverse aUniverse, Throwable t) {
}
}
}

if (foundError) {
throw VMError.shouldNotReachHere("Analysis failed while parsing deopt and/or runtime methods");
}
}

private class RuntimeCompilationParsingSupport implements SVMParsingSupport {
Expand Down

0 comments on commit 3010d75

Please sign in to comment.