Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Dec 18, 2023
1 parent 00326f7 commit 821fd83
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions core/src/main/resources/natives.xml
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,31 @@
fieldType="Ljava/lang/Runnable" ref="arg0" value="arg0" />
<putfield class="Ljava/lang/Thread" field="target"
fieldType="Ljava/lang/Runnable" ref="arg0" value="arg0" />
<!-- for JDK 21 -->
<new def="x"
class="Ljava/lang/Thread/FieldHolder" />
<putfield class="Ljava/lang/Thread" field="holder"
fieldType="Ljava/lang/Thread/FieldHolder" ref="arg0" value="x" />
<getfield class="Ljava/lang/Thread" field="holder"
fieldType="Ljava/lang/Thread/FieldHolder" def="h" ref="arg0" />
<putfield class="Ljava/lang/Thread/FieldHolder" field="task"
fieldType="Ljava/lang/Runnable" ref="h" value="arg0" />
</method>
<method name="&lt;init&gt;"
descriptor="(Ljava/lang/Runnable;)V">
<putfield class="Ljava/lang/Thread" field="runnable"
fieldType="Ljava/lang/Runnable" ref="arg0" value="arg1" />
<putfield class="Ljava/lang/Thread" field="target"
fieldType="Ljava/lang/Runnable" ref="arg0" value="arg1" />
<!-- for JDK 21 -->
<new def="x"
class="Ljava/lang/Thread/FieldHolder" />
<putfield class="Ljava/lang/Thread" field="holder"
fieldType="Ljava/lang/Thread/FieldHolder" ref="arg0" value="x" />
<getfield class="Ljava/lang/Thread" field="holder"
fieldType="Ljava/lang/Thread/FieldHolder" def="h" ref="arg0" />
<putfield class="Ljava/lang/Thread/FieldHolder" field="task"
fieldType="Ljava/lang/Runnable" ref="h" value="arg1" />
</method>
<method name="isAlive" descriptor="()Z"></method>
<method name="resume0" descriptor="()V" />
Expand All @@ -518,6 +536,17 @@
fieldType="Ljava/lang/Runnable" def="y" ref="arg0" />
<call type="interface" name="run"
class="Ljava/lang/Runnable" descriptor="()V" arg0="y" />
<!-- for JDK 21 -->
<getfield class="Ljava/lang/Thread" field="holder"
fieldType="Ljava/lang/Thread/FieldHolder" def="h" ref="arg0" />
<putfield class="Ljava/lang/Thread/FieldHolder" field="task"
fieldType="Ljava/lang/Runnable" ref="h" value="arg0" />
<getfield class="Ljava/lang/Thread/FieldHolder" field="task"
fieldType="Ljava/lang/Runnable" def="z" ref="h" />
<call type="interface" name="run"
class="Ljava/lang/Runnable" descriptor="()V" arg0="z" />
<!--<call type="interface" name="run"
class="Ljava/lang/Runnable" descriptor="()V" arg0="arg0" />-->
</method>
<method name="stop0" descriptor="()V" />
<method name="yield" descriptor="()V" static="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void testLibModels()

CallGraph cg = CallGraphTestUtil.buildZeroCFA(options, new AnalysisCacheImpl(), cha, false);

// System.err.println(cg);
System.err.println(cg);

// Find node corresponding to finalize
TypeReference t =
Expand Down

0 comments on commit 821fd83

Please sign in to comment.