Skip to content

Commit

Permalink
Don't stop when method body load failed.
Browse files Browse the repository at this point in the history
But mark the class as excluded.

Signed-off-by: am009 <warrenwjk@qq.com>
  • Loading branch information
am009 committed Nov 28, 2023
1 parent 8698b75 commit d3934e6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/soot/SootMethod.java
Expand Up @@ -450,8 +450,14 @@ public Body retrieveActiveBody(Consumer<Body> consumer) {
throw new RuntimeException("No method source set for method " + this);
}

// Method sources are not expected to be thread safe
activeBody = ms.getBody(this, "jb");
try {
// Method sources are not expected to be thread safe
activeBody = ms.getBody(this, "jb");
} catch (Exception e) {
logger.warn("Failed to build body for method " + this);
setPhantom(true);
return null;
}

// Call the consumer such that clients can update any data structures, caches, etc.
// atomically before the body is available to other threads.
Expand Down

0 comments on commit d3934e6

Please sign in to comment.