[netcore] Do not inline ThrowHelpers, fix SkipFrames handling. (mono/mono#15607)
authorEgor Bogatov <egorbo@gmail.com>
Thu, 11 Jul 2019 19:42:14 +0000 (22:42 +0300)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 11 Jul 2019 19:42:14 +0000 (21:42 +0200)
1) Do not inline ThrowHelpers (e.g. `static void ThrowException() => throw new Exception();`)
2) `get_trace` incorrectly handles `skip` argument
3) fix broken ci (`dl-test-assets.py` is not python2 compatible any more)

Fixes https://github.com/mono/mono/issues/15182
Fixes https://github.com/mono/mono/issues/15188

Commit migrated from https://github.com/mono/mono/commit/792bfbff913f80a663ab086c71ac5a238e64fffa

src/mono/mono/mini/method-to-ir.c
src/mono/mono/mini/mini-exceptions.c
src/mono/netcore/CoreFX.issues.rsp
src/mono/netcore/build.sh

index e29b9ed..e160f47 100644 (file)
@@ -3905,6 +3905,11 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method)
        if (mono_profiler_coverage_instrumentation_enabled (method))
                return FALSE;
 
+#if ENABLE_NETCORE
+       if (!cfg->ret_var_set)
+               return FALSE;
+#endif
+               
        return TRUE;
 }
 
index e00edba..b41684e 100644 (file)
@@ -1141,7 +1141,7 @@ ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_file_info
                }
 
                mono_debug_free_source_location (location);
-               mono_array_setref_internal (res, i, sf);
+               mono_array_setref_internal (res, i - skip, sf);
        }
 
        return res;
index 40db429..42760f5 100644 (file)
 ##  System.Diagnostics.StackTrace.Tests
 ####################################################################
 
-# ArgumentNullException thrown
-# https://github.com/mono/mono/issues/15182
--nomethod System.Diagnostics.Tests.StackTraceTests.Ctor_Exception_SkipFrames
-
 # Expected -1, but got 0
 # https://github.com/mono/mono/issues/15183
 -nomethod System.Diagnostics.Tests.StackFrameTests.Ctor_SkipFrames
 # https://github.com/mono/mono/issues/15187
 -nomethod System.Diagnostics.Tests.StackFrameTests.Ctor_SkipFrames_FNeedFileInfo
 
-# ArgumentNullException : Value cannot be null
-# https://github.com/mono/mono/issues/15188
--nomethod System.Diagnostics.Tests.StackTraceTests.Ctor_Exception_SkipFrames_FNeedFileInfo
-
 ####################################################################
 ##  System.Drawing.Common.Tests
 ####################################################################
index b930747..bcb4d0c 100755 (executable)
@@ -108,6 +108,7 @@ fi
 
 # run all xunit tests
 if [ "$test" = "true" ]; then
+  make update-tests-corefx
   for testdir in corefx/tests/extracted/*; do
     ../scripts/ci/./run-step.sh --label=$(basename $testdir) --timeout=15m make run-tests-corefx-$(basename $testdir)
   done