Release Notes Mono 3.12.0

Release date: 13 Jan 2015

Mono 3.12.0 is the result of about 3 months of work, featuring over 600 commits and 68 fixes. It was the work of 70 contributors.


  • Major performance and memory consumption improvements on SGen.
  • Improve the heuristic of the ThreadPool to maximize efficiency and minimize the number of Threads
  • Experimental preview on new Windows installer
  • New cert-sync tool automatically syncs Mono’s certificate store against the OS certificate store on Linux

Garbage Collector

  • Reorganized how major heap blocks are manipulated for increased efficiency of the major collection.
  • Reduced memory consumption by better sizing of allocation buckets.
  • Switched to a simpler heuristics for major heap sizing that is more stable and avoid unexpected spikes.
  • Removed the parallel collector, it was an experimental feature that did not provide an effective speedup. It will be brought back in the future with a functioning design.
  • Removed the fixed heap configuration, it was an experimental feature that did not deliver enough of a performance improvement. Removed for the additional complexity.
  • Canaries are now supported for the nursery. Canaries is a lightweight debugging tool for detecting memory corruption. Enable it with the new “nursery-canaries” option in the MONO_GC_DEBUG environment variable.


  • Switched to adaptative hill climbing for sizing the pool. This fixes the cases where the old algorithm would cause thrashing by spinning too many threads.
  • The supervisor thread now goes into deep sleep when no new jobs are submitted for a while. This should save power on targets running on batteries.


  • Implement the new suspend machinery on Windows, amd64 and arm. The new machinery is known to be more reliable and results in significantly less hangs when using advanced threading features of the platform.
  • The minimum version support of Windows is now WinXP SP2, it was Windows 2000 before. (Wait what?)


  • Debugger support for 64bits Windows.
  • Multiple fixes in the profiler to make statistical sampling reliable and functional on unix targets without kernel assisted sampling.


  • X86 code now generate pushless code. This is faster on modern cpus and produces smaller unwind information.
  • Reworked internal runtime locking to do less work under hot locks and do more optimistic metadata loading.

Class Libraries

  • OS X now uses an experimental FileSystemWatcher that relies on kqueue. It works and doesn’t require polling.


  • New experimental Windows installer available. It’s a technical preview so any feedback is welcome.
  • Mono on Debian now AOT’s mscorlib.dll and mcs.exe on installation. We also support a simple manifest structure so any assembly can be arbitrarily AOT’d on installation.


Mono users on Linux no longer need to run mozroots to get SSL working. A new command, cert-sync, has been added to this release, which synchronizes the Mono SSL certificate store against your OS certificate store – and this tool has been integrated into the packaging system for all packages, so it is automatically used when you install Mono via our packages. Just make sure the ca-certificates-mono package is installed on Debian/Ubuntu (it’s always bundled on RPM-based distros) to take advantage! It should be installed on fresh installs by default.

If you want to invoke the tool manually (e.g. you installed via make install, not packages) use

cert-sync /path/to/ca-bundle.crt

On Debian systems, that’s

cert-sync /etc/ssl/certs/ca-certificates.crt

and on Red Hat derivatives it’s

cert-sync /etc/pki/tls/certs/ca-bundle.crt

Your distribution might use a different path, if it’s not derived from one of those.

Known Issues

  • The new OS X kqueue FileSystemWatcher will consume all file descriptors when watching very large directories.
  • Canaries might not work under 64bits and produce false reports in some pinning corner cases.

Bug fixes

Runtime bug fixes

  • Avoid asserts on shutdown when the appdomain unload callbacks are called on the debugger thread during shutdown. Fixes #24342.
  • Fix the calculation of the epilog size for EH info. Fixes #24577.
  • Fix a class initialization race which happens if a class initializer initializes a got slot before it finishes running. Fixes #23242.
  • Fix OP_LOCALLOC on arm so it correctly adjusts sp with the param area size even if the size is large. Fixes #24221.
  • Disable the extension of i8/i16 arguments to i32 on arm64, since the ios calling convention passes them differently than i32. Fixes #22800.
  • Use NULLIFY_INS () to nullify instructions and use MONO_INST_NEW to create phi node instructions to avoid asserts in the spill pass. Fixes #24006.
  • Rewrite the way direct calls are made between llvm methods. Previously all calls were made to plt entries and the plt entry symbols were aliased to point to the corresponding method if the method was directly callable using the .set assembler directive. This doesn’t seem to work with newer LLVM/CLANG versions, so do this completely on the LLVM side using Value::replaceAllUsesWith (). Fixes #23976.
  • Make process handles non-shared. Fixes #23423.
  • Fix the return of vtypes containing a single fp member from pinvoke methods on OS X/x86. Fixes #23813.
  • Fix an SRE assert. Fixes #19039.
  • Implement 5dbf97e66057f8626c53fcea30f1988d6627e5a2 for calls made from NEWOBJ too. Fixes #23557.
  • Make each CASTCLASS_CACHE patch unique by generating a unique identifier from the method index and an per-method counter. Fixes #23478.
  • Disallow generic classes with explicit layout. Fixes #23438.
  • Add an option to make debugger invokes virtual. Part of the fix for #23385.
  • Allow renaming of threadpool threads. Fixes #23206.
  • Fix the unregistration of our exception handler on Windows. Fixes #23221.
  • Make calls from gshared to gsharedvt sharable methods indirect since otherwise at runtime we might find an instantiation and we cannot patch the call, leading to performance problems. Fixes #23021.
  • Allow the SIZEOF opcode in gsharedvt code if it doesn’t reference a gsharedvt type. Fixes #22711.
  • Fix mono_marshal_free_ccw (). Fixes #22414.

Class Libraries bug fixes

  • Fixes DbEnumerator current property to clone read data. Fixes #24452
  • Allow sending of text data longer than 4000 characters by using a different column type. Fixes #21172.
  • Implement MonoGenericClass:GetCustomAttributes () for created types. Fixes #23769.
  • Improved BlockingCollection.AddAny. Fixes #22775.
  • Implement KnownTypes for DataContractJsonSerializer. Fixes #23058
  • HttpQSCollection.ToString now url encodes values. Fixes 22557.
  • Call SetupRequestAsync only after ContentType changes. Fixes 19529.
  • Notify parent task when child task uses NotOnFaulted. Fixes #23594
  • Use TZ transitions when AdjustementRules are ignored. Fixes 23170.
  • Timespan ticks formatting rewrite. Fixes #23376
  • Improved Json deserialization of floating-point numbers. When DataContractJsonSerializer was created from type object, deserialization of floating.point numbers was not possible. Fixes 21583.
  • Test Json deserialization of a floating-point number as object. Covers 21583.
  • Rss20ItemFormatter.ReadFrom now sets Id when guid is PermaLink. Fixes 23262.
  • fix bug #23318 - XComment.ToString() accepts “invalid” values.
  • UriParseComponents no longer decodes ‘@’ in UserInfo. Fixes 23246.
  • Update en-NZ designators. Fixes #22212
  • Update to my last fix for bug #22129.
  • Copy out/ref parameters on async call; bug #22129.
  • If not specified assume that array items are nullable. Fixes #19012.
  • Added optional serialization based on ShouldSerialize{V}. SerializationCodeGenerator and XmlSerializationWriterInterpreter will no longer serialize an attribute named {V} if its object has a method named ShouldSerialize{V}() that returns false. {V}Specified now is also checked to be true before serializating the attribute even if it is a property that is not settable. Fixes #1852.
  • GMT DateTimeOffset is now properly parsed. Fixes #22851. GMT date formats set useutc to true, so now useutc is checked to init DateTimeOffset with a zero offset.
  • Improved CalendricalCalculations fixed_from_dmy methods. Fixes #21930. In some cases fixed_from_dmy is used with the month parameter greater than the number of months of that year. Year is now incremented until month parameter is valid.
  • Enumerate all subdirectories including the first one. Fixes #22857
  • Encode ContentDisposition name. Fixes #18422
  • When needed serialized objects are now implicitly converted. Fixes #20403.
  • Fix ClientWebSocket.ReceiveAsync() with small buffer; bug #22704.
  • Tokenize dash only in range values. Fixes #22764
  • Added time format with only offset. Fixes #22558.
  • fix bug #6512 (by Mikkel Kruse Johnsen) - don’t deserialize GET parameters.
  • Added support for UriComponents.SerializationInfoString. Fixes #21571.
  • Unify handling of default ctor and zero. Fixes #22591
  • Make SendAsync state free to handle recursive calls. Fixes #22724
  • Actually fix #22179 to allow concurrent requests.
  • DateTime.Parse now handles unlimited number of fractional digits. This change was made because .NET can parse ISO8601 format with an unlimited number of fractional digits. Fixes #22417.
  • Added test ISO8601FractionalDigits. Covers #22417.
  • Delay reflection hit to actual execution point. Workarounds #22522
  • Update RequestMessage.RequestUri.AbsoluteUri after redirect. Fixes #22383
  • Catch exceptions thrown by SerialPortStream.Dispose () when called from the finalizer. Fixes #15514
  • KeyPairPersistence now tries to fix folder permissions. An exception is no longer thrown if the folder permissions can be fixed. Fixes bug 19274.

C# Compiler bug fixes

  • A pointer-type may be used as the type of a volatile field. Fixes #23770
  • Correctly identify constant switch section when value match is not section start. Fixes #23475
  • Check for true/false user operators on unwrapped nullable type. Fixes #23199
  • More tweaks to conditional tokenizer. Fixes #23319
  • Populate inherited constraints member cache from types not only base types. Fixes #23017
  • Fix removing incomplete generic types from eval cache. Fixes #22393
  • Parsing of ternary expressions whose then condition is a lambda. Fixes #22523

MSBuild bug fixes

  • Use ToolPath when building ToolTask execution path. Fixes #22981