forked from pool/mono-core
Accepting request 536286 from home:Warhammer40k:Mono:Factory
Fix bxc#59608 - Attribute MethodImplOptions.AggressiveInlining causes method to always return NULL OBS-URL: https://build.opensuse.org/request/show/536286 OBS-URL: https://build.opensuse.org/package/show/Mono:Factory/mono-core?expand=0&rev=190
This commit is contained in:
parent
e02265dea3
commit
adf8230843
93
bug-59608.patch
Normal file
93
bug-59608.patch
Normal file
@ -0,0 +1,93 @@
|
||||
diff -uprN mono-5.4.0.201/external/api-snapshot/profiles/net_4_x/PEAPI.cs mono-5.4.0.201.new/external/api-snapshot/profiles/net_4_x/PEAPI.cs
|
||||
--- mono-5.4.0.201/external/api-snapshot/profiles/net_4_x/PEAPI.cs 2017-10-04 18:31:32.000000000 +0300
|
||||
+++ mono-5.4.0.201.new/external/api-snapshot/profiles/net_4_x/PEAPI.cs 2017-10-24 05:28:58.773995162 +0300
|
||||
@@ -473,6 +473,7 @@ namespace PEAPI
|
||||
}
|
||||
public enum ImplAttr
|
||||
{
|
||||
+ AggressiveInlining = 256,
|
||||
ForwardRef = 16,
|
||||
IL = 0,
|
||||
InternalCall = 4096,
|
||||
diff -uprN mono-5.4.0.201/mono/mini/iltests.il mono-5.4.0.201.new/mono/mini/iltests.il
|
||||
--- mono-5.4.0.201/mono/mini/iltests.il 2017-10-04 18:30:42.000000000 +0300
|
||||
+++ mono-5.4.0.201.new/mono/mini/iltests.il 2017-10-24 05:30:44.849696785 +0300
|
||||
@@ -2896,4 +2896,50 @@ END:
|
||||
IL_0018: ldloc.0
|
||||
ret
|
||||
}
|
||||
+
|
||||
+ .method private hidebysig static void fail_inline() cil managed
|
||||
+ {
|
||||
+ // Code size 9 (0x9)
|
||||
+ .maxstack 8
|
||||
+ IL_0000: ldc.i4.s 16
|
||||
+ IL_0002: conv.u
|
||||
+ IL_0003: ldc.i4.1
|
||||
+ IL_0004: mul.ovf.un
|
||||
+ IL_0005: localloc
|
||||
+ IL_0007: pop
|
||||
+ IL_0008: ret
|
||||
+ }
|
||||
+
|
||||
+ .method private hidebysig static int32
|
||||
+ always_inline(int32 op) cil managed aggressiveinlining
|
||||
+ {
|
||||
+ // Code size 24 (0x18)
|
||||
+ .maxstack 8
|
||||
+ IL_0000: ldarg.0
|
||||
+ IL_0001: brfalse.s IL_0009
|
||||
+
|
||||
+ IL_0003: ldarg.0
|
||||
+ IL_0004: ldc.i4.2
|
||||
+ IL_0005: beq.s IL_000b
|
||||
+
|
||||
+ IL_0007: br.s IL_000d
|
||||
+
|
||||
+ IL_0009: ldc.i4.0
|
||||
+ IL_000a: ret
|
||||
+
|
||||
+ IL_000b: ldc.i4.3
|
||||
+ IL_000c: ret
|
||||
+
|
||||
+ IL_000d: call void Tests::fail_inline()
|
||||
+ IL_0012: newobj instance void [mscorlib]System.Exception::.ctor()
|
||||
+ IL_0017: throw
|
||||
+ }
|
||||
+
|
||||
+ .method public hidebysig static int32 test_3_regress_59608() cil managed
|
||||
+ {
|
||||
+ .maxstack 8
|
||||
+ IL_0000: ldc.i4.2
|
||||
+ IL_0001: call int32 Tests::always_inline(int32)
|
||||
+ IL_000c: ret
|
||||
+ }
|
||||
}
|
||||
diff -uprN mono-5.4.0.201/mono/mini/method-to-ir.c mono-5.4.0.201.new/mono/mini/method-to-ir.c
|
||||
--- mono-5.4.0.201/mono/mini/method-to-ir.c 2017-10-04 18:30:42.000000000 +0300
|
||||
+++ mono-5.4.0.201.new/mono/mini/method-to-ir.c 2017-10-24 05:30:44.853696774 +0300
|
||||
@@ -6156,9 +6156,7 @@ inline_method (MonoCompile *cfg, MonoMet
|
||||
prev_args = cfg->args;
|
||||
prev_arg_types = cfg->arg_types;
|
||||
prev_inlined_method = cfg->inlined_method;
|
||||
- cfg->inlined_method = cmethod;
|
||||
- cfg->ret_var_set = FALSE;
|
||||
- cfg->inline_depth ++;
|
||||
+ prev_ret_var_set = cfg->ret_var_set;
|
||||
prev_real_offset = cfg->real_offset;
|
||||
prev_cbb_hash = cfg->cbb_hash;
|
||||
prev_cil_offset_to_bb = cfg->cil_offset_to_bb;
|
||||
@@ -6168,9 +6166,12 @@ inline_method (MonoCompile *cfg, MonoMet
|
||||
prev_cbb = cfg->cbb;
|
||||
prev_current_method = cfg->current_method;
|
||||
prev_generic_context = cfg->generic_context;
|
||||
- prev_ret_var_set = cfg->ret_var_set;
|
||||
prev_disable_inline = cfg->disable_inline;
|
||||
|
||||
+ cfg->inlined_method = cmethod;
|
||||
+ cfg->ret_var_set = FALSE;
|
||||
+ cfg->inline_depth ++;
|
||||
+
|
||||
if (ip && *ip == CEE_CALLVIRT && !(cmethod->flags & METHOD_ATTRIBUTE_STATIC))
|
||||
virtual_ = TRUE;
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 00:00:00 UTC 2017 - fwdsbs.to.11df@xoxy.net
|
||||
|
||||
- Add bug-59608.patch:
|
||||
* Fix bxc#59608 - Attribute MethodImplOptions.AggressiveInlining causes method to always return NULL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 20 00:00:00 UTC 2017 - fwdsbs.to.11df@xoxy.net
|
||||
|
||||
|
@ -58,6 +58,8 @@ Patch1: ucontext.patch
|
||||
Patch2: provides-facades.patch
|
||||
# PATCH-FIX-UPSTREAM System.Net.Sockets.EndSend returns incorrect value. See https://bugzilla.xamarin.com/show_bug.cgi?id=57918 for more information
|
||||
Patch3: bug-57918.patch
|
||||
# PATCH-FIX-UPSTREAM Attribute MethodImplOptions.AggressiveInlining causes method to always return NULL, patch created from commits: https://github.com/mono/mono/commit/df4669b216cb331e3b151b9171deee89339d34e2 and https://github.com/mono/api-snapshot/commit/c1a7bd7e026c9280fcd9825227d7ddde67255e00
|
||||
Patch4: bug-59608.patch
|
||||
# PATCH-FIX-OPENSUSE remove checks for libmono in mono-find-provides and mono-find-requires scripts
|
||||
Patch14: find-deps-fix.patch
|
||||
# PATCH-FIX-OPENSUSE revert Microsoft.Build.Tasks library to use old mcs compiler. This will make xbuild to use old mcs instead of csc - patch is used when roslyn is unavailable for current platform (big-endian systems).
|
||||
@ -208,6 +210,7 @@ technologies that have been submitted to the ECMA for standardization.
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch14 -p1
|
||||
%patch16 -p1
|
||||
%if %roslyn == no
|
||||
|
Loading…
Reference in New Issue
Block a user