Skip to content

Conversation

marcus-h
Copy link

    Ensure that the java.lang.Thread class is loaded in InnerClassWithThreadTest
    
    If the Thread class is not loaded, frameworks like SootUp or Opal treat the
    Thread class as a phantom class. Hence, a call like "t.start()" is simply
    bypassed (since DataFlowScope.EXCLUDE_PHANTOM_CLASSES is used) and not
    analyzed.
    
    However, loading the Thread class results in a failure of the
    InnerClassWithThreadTest.threadQuery test, if the SootUp or Opal framework
    is used. This test fails because "Thread.start()" calls the native method
    "Thread.start0()", which causes the flow to stop. Hence, disable this test
    for SootUp and Opal.
    Note: The threadQuery test succeeds in case of the Soot framework because
    Soot's callgraph has an additional "virtual" edge from "Thread.start()" to
    "Thread.run()", which keeps the flow alive.

…eadTest

If the Thread class is not loaded, frameworks like SootUp or Opal treat the
Thread class as a phantom class. Hence, a call like "t.start()" is simply
bypassed (since DataFlowScope.EXCLUDE_PHANTOM_CLASSES is used) and not
analyzed.

However, loading the Thread class results in a failure of the
InnerClassWithThreadTest.threadQuery test, if the SootUp or Opal framework
is used. This test fails because "Thread.start()" calls the native method
"Thread.start0()", which causes the flow to stop. Hence, disable this test
for SootUp and Opal.
Note: The threadQuery test succeeds in case of the Soot framework because
Soot's callgraph has an additional "virtual" edge from "Thread.start()" to
"Thread.run()", which keeps the flow alive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant