<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-CZ" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">On 13.07.2022 22:10, "Rafael Winterhalter" <rafael.wth@gmail.com> wrote:<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">If you are exciting the tests of this repo (you'd need to use my "monad" branch to do so, but the error is not related to it), then OpenJDK would, for FrameWithMissingType - where
the "Missing" class is not present - compute the following bytecode if it the instructions of "m" are copied to a new class:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><br>
public m(Z)V<br>
ILOAD 1<br>
IFEQ 1<br>
NEW codes/rafael/asmjdkbridge/sample/FrameWithMissingType$Present<br>
DUP<br>
INVOKESPECIAL codes/rafael/asmjdkbridge/sample/FrameWithMissingType$Present.<init> ()V<br>
ASTORE 2<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"> GOTO 2<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"> LABEL 1<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"> FRAME SAME<br>
NEW codes/rafael/asmjdkbridge/sample/FrameWithMissingType$Missing<br>
DUP<br>
INVOKESPECIAL codes/rafael/asmjdkbridge/sample/FrameWithMissingType$Missing.<init> ()V<br>
ASTORE 2<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"> LABEL 2<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"> FRAME APPEND [java/lang/Object] // this will render slot 2 of type object, the next two lines yield the verification error<br>
ALOAD 2<br>
INVOKEINTERFACE codes/rafael/asmjdkbridge/sample/FrameWithMissingType$Iface.m ()V (itf)<br>
RETURN<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">When specifying the frames explicitly in ASM, this does not happen where the append frame with comment above is correctly:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"> FRAME APPEND [codes/rafael/asmjdkbridge/sample/FrameWithMissingType$Iface]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt">Both </span><span style="font-size:11.0pt">FRAME APPEND [java/lang/Object] or FRAME APPEND [codes/rafael/asmjdkbridge/sample/FrameWithMissingType$Iface] are valid and both pass verification during class loading.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Common ancestor of </span><span style="font-size:11.0pt">FrameWithMissingType$Present and FrameWithMissingType$Missing is java/lang/Object and it is a valid entry in the stack map frame.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Declaration of common interface FrameWithMissingType$Iface in stack map frame is irrelevant, as interfaces are not subject of hierarchical assignability verification.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</body>
</html>