Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mono.Cecil] Enforce empty body when a MethodDefinition's rva value is 0
The prior behavior assumed a MethodDefinition's RVA value of 0 meant an effectively empty body with a single RET instruction. This change removes the RET insertion and leaves the method completely empty. This is important for mono's UnsafeAccessor detection around methods specified as extern as it uses a quicker method of an empty vs non-empty body to bypass loading / checking custom attributes. Fixes dotnet/runtime#102045
- Loading branch information