Skip to content

Ensure that the java.lang.Thread class is loaded in InnerClassWithThreadTest#208

Merged
swissiety merged 3 commits into
secure-software-engineering:developfrom
marcus-h:fix_threadQuery_test
Jan 21, 2026
Merged

Ensure that the java.lang.Thread class is loaded in InnerClassWithThreadTest#208
swissiety merged 3 commits into
secure-software-engineering:developfrom
marcus-h:fix_threadQuery_test

Conversation

@marcus-h
Copy link
Copy Markdown

    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.

Marcus Huewe and others added 3 commits September 12, 2025 20:02
…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.
@swissiety swissiety enabled auto-merge January 21, 2026 15:17
Copy link
Copy Markdown
Member

@swissiety swissiety left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@swissiety swissiety merged commit 968df97 into secure-software-engineering:develop Jan 21, 2026
8 checks passed
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.

2 participants