# Tuesday, 10 August 2010
IKVM.NET 0.44 Release Candidate 4

More bug fixes and another release candidate.

Changes:

  • Changed version to 0.44.0.4
  • Fixed Object.wait() to not throw an exception when a timeout > Integer.MAX_VALUE is used. Thanks to Andy Malakov for reporting this.
  • IKVM.Reflection: Fixed IA64 and x64 import directory alignment.
  • IKVM.Reflection: Fixed bug #3040528. Thanks to Ignacio Hernandez-Ros.

Binary available here: ikvmbin-0.44.0.4.zip

Sources: ikvmsrc-0.44.0.4.zip, openjdk6-b18-stripped.zip

The sources zip no longer contains any binaries.

Tuesday, 10 August 2010 08:40:31 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
# Wednesday, 04 August 2010
IKVM.NET 0.44 Release Candidate 3

A new release candidate with several bug fixes.

Changes:

  • Changed version to 0.44.0.3
  • Updated HOWTO. Thanks to Dawid Weiss.
  • Fixed Process.destroy() to swallow System.ComponentModel.Win32Exception.
  • Fixed Inflater.finished() to not throw NullPointerException if it is called after end() has been called.
  • Fix for bug #3035831. Thanks to Dawid Weiss.
  • Fixed issue with reflecting on inner classes of cli.System.Exception.
  • Fixed another verifier regression introduced with try/fault handler changes.
  • Fixed field reflection slow path to throw NullPointerException instead of IllegalArgumentException for instance fields if the instance object is null.
  • Fixed dynamic mode late bound (dynamic) instructions to throw NoClassDefFoundError before NullPointerException.
  • Fixed Inet4AddressImpl.getHostByAddr() to catch System.ArgumentException and throw java.net.UnknownHostException instead.
  • Fixed path canonicalization issue exposed by JRuby (which subclasses java.io.File to use a / file separator on Windows).

Binary available here: ikvmbin-0.44.0.3.zip

Sources: ikvmsrc-0.44.0.3.zip, openjdk6-b18-stripped.zip

The sources zip no longer contains any binaries.

Wednesday, 04 August 2010 08:35:28 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
# Tuesday, 27 July 2010
IKVM.NET 0.44 Release Candidate 2

A new release candidate with two bug fixes.

Changes:

  • Changed version to 0.44.0.2
  • Fixed Field.set() bug #3033769.
  • 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.

Binary available here: ikvmbin-0.44.0.2.zip

Sources: ikvmsrc-0.44.0.2.zip, openjdk6-b18-stripped.zip

The sources zip no longer contains any binaries.

Tuesday, 27 July 2010 08:59:53 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
IKVM.NET Security Update

Potential Security Vulnerability

There is a bug IKVM's implementation of java.lang.reflect.Field.set(). 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.

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:

  • 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.
  • 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.
  • If you process data or a (lightweight) scripting language that somehow exposes Field.set() functionality to untrusted data/code.

Affected Versions

IKVM.NET version 0.38, 0.40, 0.42 and 0.44 are affected. Version 0.36 and earlier are not affected.

Update

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.

IKVM.NET 0.42 Update 2

Changes:

  • Updated version to 0.42.0.7.
  • Fixed Field.set() bug #3033769.

Binaries available here: ikvmbin-0.42.0.7.zip

Sources: ikvm-0.42.0.7.zip, openjdk6-b16-stripped.zip

Credits

Thanks to Dawid Weiss for reporting this issue.

Tuesday, 27 July 2010 08:57:38 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
# Monday, 12 July 2010
IKVM.NET 0.44 Release Candidate 1

A new release candidate with two bug fixes.

Changes:

  • Changed version to 0.44.0.1
  • Fixed verifier regression introduced with try/fault handler changes. Thanks to Enrico Minack for reporting this.
  • 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.

Binary available here: ikvmbin-0.44.0.1.zip

Sources: ikvmsrc-0.44.0.1.zip, openjdk6-b18-stripped.zip

The sources zip no longer contains any binaries.

Monday, 12 July 2010 09:09:49 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
# Wednesday, 07 July 2010
IKVM.NET 0.44 Release Candidate 0

The first 0.44 release candidate is available.

What's New (relative to IKVM.NET 0.42):

  • Integrated OpenJDK 6 build 18
  • Bug fixes
  • Code cleanup
  • Many AWT improvements (by Nat and Volker)
  • IKVM.Reflection
  • Ability to build from source targetting .NET 4.0
  • Reflection optimizations
  • Codegen optimizations
  • JNI optimizations
  • Introduced IKVM.OpenJDK.Tools.dll
  • Improved build process (removed dependency on shipping stub jar binaries)
  • Improved ikvmc parameter validation and error handling
  • Annotated all security critical code with .NET 4.0 security model custom attributes
  • Added -nostdlib option to ikvmstub and ikvmc to allow them to work with .NET 4.0 assemblies (while running on .NET 2.0)
  • Implemented RuntimeMXBean and OperatingSystemMXBean
  • Experimental (when built from source, targetting .NET 4.0) support for class GC

Binary available here: ikvmbin-0.44.0.0.zip

Sources: ikvmsrc-0.44.0.0.zip, openjdk6-b18-stripped.zip

The sources zip no longer contains any binaries.

Wednesday, 07 July 2010 15:54:40 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
Bug Reports

I've disabled the ability for anonymous users to post bug reports (and feature requests). Two useless duplicate reports (3026137 and 3026140) pushed me over the edge.

Some bug reporting tips:

  • Include all the (possibly) relevant information (IKVM.NET, .NET / Mono and Operating System version numbers, CPU architecture, error messages, warning messages).
  • Try to create a small repro that demonstrates the problem. Make sure it compiles, don't just include a non-compiling code snippet.
  • Clearly separate fact from speculation.
  • Read this excellent essay on How to Report Bugs Effectively by Simon Tatham.

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. This is a Reflector bug, it simply doesn't understand the code constructs that ikvmc generates (even though they are perfectly valid).

Wednesday, 07 July 2010 14:11:51 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
# Wednesday, 30 June 2010
IKVM.Reflection Testing

I decided to do some brute force testing of IKVM.Reflection. I ran my LinkerPrototype 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.

Fixes:

  • MethodInfo.DeclaringType should return null for global generic method instances.
  • Fixed support for TypeSpec in custom modifiers.
  • Fixed bug that caused duplicate MethodSpec rows to be emitted.
  • Fixed bug that caused duplicate MemberRef rows to be emitted.
  • Allow use of generic method definition in IL stream.
  • Made signature binding lazy for GenericMethodInstance.
  • Allow declarative security attributes to use non-public constructors.
  • Implemented ManifestResourceInfo.FileName property.
  • Implemented workaround for incorrect exception table length in methods generated by VB compiler.
  • Fixed exception filter block handling to support having both regular handlers and a filter for the same try block.
  • Fixed metadata header to account for the actual ImageRuntimeVersion string length, instead of assuming it to be "v2.0.50727".
  • Implemented __GetDeclaredMethods() for ArrayType and MultiArrayType.
  • Fixed two MarshalSpec blob parsing bugs.
  • Fixed several places where generic type definitions would be encoded as TypeDef token instead of TypeSpec.
  • Re-instroduced generic type instantation for "identity" instantations of TypeBuilder types.
  • Several fixes for C++/CLI that tends to stick custom modifiers everywhere. Also, support void& in local variable signature.
  • Support fields that have an RVA, but where it is set to zero (C++/CLI does this).
  • Added support for a TypeRef with a null ResolutionScope.

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: ikvm-reflect-0.43.3833.zip

Wednesday, 30 June 2010 10:47:31 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
Apache PDFBox 1.2.0 Released

Yesterday the release of Apache PDFBox 1.2.0 was announced. Thanks to Daniel Wilson the included Ant build script to build the .NET version has been updated to work with IKVM.NET 0.42.

Wednesday, 30 June 2010 08:50:07 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
# Monday, 21 June 2010
New Development Snapshot

One more development snapshot. A couple of minor tweaks.

Changes:

  • Updated copyright notices.
  • Removed Winforms thread workaround timer that was previously required to make the thread abortable.
  • IKVM.Reflection: Fixed a couple of bugs related to escaped type names not being unescaped.
  • 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).
  • IKVM.Reflection: Changed assembly identity caching to only add identities to the cache when they are used to look up the assembly.

Binaries available here: ikvmbin-0.43.3824.zip

Monday, 21 June 2010 10:36:02 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]