Skip to content

Releases: MonoMod/MonoMod

v20.03.05.01

06 Mar 20:12
016635a
Compare
Choose a tag to compare

RuntimeDetour

  • Replace IL jmp for generated trampoline with manual ldarg * call orig ret to avoid a JIT bug present in older versions of Mono. The JIT bug mainly affected methods returning structs and / or having struct parameters.

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v20.03.01.01

01 Mar 18:17
Compare
Choose a tag to compare

Utils

  • Allow DynamicMethodDefinitions to have an OwnerType - currently only used by the DynamicMethod generator backend.
  • Bump Mono dynamic method anti-inlining nop count to 32.
  • Make DynData more thread safe, especially with async GCs.
  • Fix DynData's Dispose behavior - no longer incorrectly freeing all custom data.
  • Make DynData keep the referenced object alive as long as the DynData instance is enabled. This is enabled by default and can be disabled by supplying an additional boolean parameter.
  • Implement the ILOffset property in CecilILGenerator.

Patcher

  • Add MONOMOD_DEBUG_FORMAT=pdb/mdb environment variable (Thanks, Zatherz!)
  • Fix MonoModPublic from being ignored when using MonoModIgnore. Custom rules and certain built-in modifiers should still be applied.

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v20.02.01.01

01 Feb 17:42
9ba5d18
Compare
Choose a tag to compare

Common

  • Allow changing the visibility of all Common classes to internal via the MONOMOD_INTERNAL compile time flag (only effective when building Common yourself from source).
  • MonoMod.Common is now used in Harmony 2.X, paving the way to share fixes and improvements in both directions.

Utils

  • Fix PlatformHelper detecting iOS on non-Unix platforms.
  • Make CecilILGenerator properly emit labels and exception blocks without nops (Thanks, @denikson!).
  • DynamicMethodDefinition parameter names and attributes now get copied when using the System.Reflection.Emit generators.
  • Expose the corlib_internal hack as the SetMonoCorlibInternal extension method for Assembly.
  • Cache corlib_internal assemblies in ReflectionHelper (Thanks, @denikson!).
  • Expose the proxied ILGeneratorShim behind an ILGenerator via the GetProxiedShim() and GetProxiedShim<T>() extension methods.
  • Add a DynEmit extension method for ILGenerator to simplify dynamically emitting instructions when the operand type is unknown at compile time.
  • Allow DMDs to use ByRef and similar types as return types.
  • Make CecilILGenerator's generated LocalBuilder information more accurately represent the values at the time of generation.
  • Add the GetDeclared extension method for MemberInfo because ReflectedType != DeclaringType.
  • Add the ImportCallSite extension method for ModuleDefinition to allow for importing / parsing CallSites from SignatureHelpers and runtime method bodies (module + resolved prebaked byte array), thus adding support for calli to DMD.

RuntimeDetour

  • Fix DetourNativeX86Platform.Is32Bit mis-checking the sign of the checked value - JMP rel32 is sign extended to 64-bits.
  • Allow for pinning methods defined in generic types.
  • Change how the embedded ARM flushicache native function gets executed.
  • Re-enable instruction cache flushing for ARM.
  • Add DisableInlining to runtime platforms, currently only implemented on Mono.
  • Make the RuntimeDetour platform types inheritable and add RuntimeNETCore.

DebugIL

Note: DebugIL is not published on NuGet.

  • Use the C# task system to dump IL in parallel.
  • Dump exception blocks (Thanks, @denikson!).
  • Add --diff launch parameter (currently the same as --skip-maxtrack --relative).

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v20.01.01.04

01 Jan 15:16
3bf5e6f
Compare
Choose a tag to compare

General

  • Fix compilation for .NET Framework 4.5+ by adding using ExceptionHandler = Mono.Cecil.ExceptionHandler; clauses where necessary.

Utils

  • Make the assembly and module names part of the ReflectionHelper cache key.
  • Resolve variable and argument / parameter index references into definition references in CecilILGenerator.
  • Fix corlib_internal offset caluclation for older versions of Mono without an arch field in the MonoAssemblyName struct (Thanks, ghorsington!).
  • Use the DMD corlib_internal hack for all versions of Mono.

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v19.12.04.01

04 Dec 15:32
f6b8b7b
Compare
Choose a tag to compare

Patcher

  • Make PatcherExtensions public, (re-)exposing some basic patch helpers.
  • Fix MatchingConditionals crashing when the current MonoModder couldn't be determined.

Utils

  • Use the member ID, not its name (which lacks generic information) for the ReflectionHelper.ResolveReflection cache (Thanks, leo!).

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v19.11.05.01

05 Nov 20:59
3f33800
Compare
Choose a tag to compare

Utils

  • Fix DynamicMethodDefinitions on versions of mono where Module::get_Assembly is virtual (Unity mono).

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v19.11.04.05

04 Nov 18:54
5069bab
Compare
Choose a tag to compare

RuntimeDetour

  • Fix detour priority sorting once again.

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v19.11.01.01

01 Nov 20:20
9769f89
Compare
Choose a tag to compare

Notes

This release is the first non-maintenance release after v19.07.04.03.

  • Certain things have been moved, renamed or otherwise refactored in a non-backwards-compatible manner.
  • All changes since v19.07.04.03 are listed in this changelog, even if they were part of earlier maintenance releases.

General

  • Drop support for .NET Standard 1.3.
  • Multi-target .NET Framework 3.5 using Cecil 0.10, .NET Framework 4.0+ using Cecil 0.11.
  • Switch DebugType to portable by default, fixing the NuGet symbol source link.

RuntimeDetour

  • Separate "common" code into MonoMod.Common, include parts of it in MonoMod.RuntimeDetour.
  • Fix transitions between AArch32 (ARM) and Thumb native code (Thanks, Coppélia!).
  • Fix FlushICache for ARM but disable it by default, as it's still unreliable on some 32-bit devices.
  • Make Hook pass the ManualApply configuration to its inner Detour, no longer ignoring its value.
  • Fix cecil.Is(refl) method parameter declaring generic type edge case.
  • Fix ILHooks being added to the chain twice.
  • Fix undoing ILHooks.
  • Fix ILHook priority issues.
  • Fix NativeDetour constructor issues, mostly related to method pinning and trampoline generation.
  • Remove HookEndpointManager.OnPostModify.

Patcher

  • Fix support for multiple MonoModCustomAttribute handlers (Thanks, 56!).

Utils

  • Separate "common" code into MonoMod.Common, include parts of it in MonoMod.Utils.
  • Replace GetManagedSize's inner per-type DynamicMethodDefinitions with a single Unsafe.SizeOf<T>-equivalent method, fixing support for older Unity mono builds.
  • Handle type-less members in MMReflectionImporter.
  • Update DynamicMethodDefinition mono assembly visibility check skip "hack" to account for mono updating _mono_assembly.
  • Split up MonoModExt into multiple partial Extensions classes.
  • Rename GetFindableID to GetID.
  • Refactor DynamicMethodDefinition generators, allowing implementing custom generators.
  • Remove LimitedStream.
  • Reimplement FastReflectionHelper using DynamicMethodDefinition.

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v19.09.01.06

01 Sep 21:52
047a9c9
Compare
Choose a tag to compare

This is a maintenance release built from the maintenance/19.08 branch.
Read the v19.08.02.03 release notes for more information.

RuntimeDetour

  • Fix undoing ILHooks.

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release

v19.09.01.03

01 Sep 13:20
001e4c5
Compare
Choose a tag to compare

This is a maintenance release built from the maintenance/19.08 branch.
Read the v19.08.02.03 release notes for more information.

RuntimeDetour

  • Fix ILHooks being added to the chain twice.

NuGet: Patcher | Utils | RuntimeDetour | HookGen
Azure DevOps Pipelines: Build | Release