Bug 60865 - * Assertion at mini-codegen.c:2264, condition `sp > 0' not met
Summary: * Assertion at mini-codegen.c:2264, condition `sp > 0' not met
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: master
Hardware: PC Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Bernhard Urban
URL:
Depends on:
Blocks:
 
Reported: 2017-11-27 10:20 UTC by Marek Safar
Modified: 2017-12-03 02:32 UTC (History)
5 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
repro.crash (41.70 KB, text/plain)
2017-11-28 19:27 UTC, Ludovic Henry
Details

Description Marek Safar 2017-11-27 10:20:17 UTC
When running System.Runtime.CompilerServices.Unsafe_xunit-test on i386 linux

* Assertion at mini-codegen.c:2264, condition `sp > 0' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0x00012>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00032] in /mnt/jenkins/workspace/test-mono-pull-request-i386/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
  at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /mnt/jenkins/workspace/test-mono-pull-request-i386/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
  at Xunit.Sdk.TestInvoker`1<TTestCase_REF>.CallTestMethod (object) [0x0000d] in <2dbd0c8e155141df800de44e485a4682>:0
  at Xunit.Sdk.TestInvoker`1/<>c__DisplayClass48_1/<<InvokeTestMethodAsync>b__1>d<TTestCase_REF>.MoveNext () [0x00106] in <2dbd0c8e155141df800de44e485a4682>:0
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<Xunit.Sdk.TestInvoker`1/<>c__DisplayClass48_1/<<InvokeTestMethodAsync>b__1>d<Xunit.Sdk.IXunitTestCase>> (Xunit.Sdk.TestInvoker`1/<>c__DisplayClass48_1/<<InvokeTestMethodAsync>b__1>d<Xunit.Sdk.IXunitTestCase>&) [0x0002c] in /mnt/jenkins/workspace/test-mono-pull-request-i386/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:316
Comment 1 Ludovic Henry 2017-11-27 16:20:18 UTC
How do you run these tests? Would you have a native stacktrace?
Comment 2 Marek Safar 2017-11-28 09:31:51 UTC
On i386 machine

1. go to mcs/class/System.Runtime.CompilerServices.Unsafe
2. make run-xunit-test
Comment 3 Ludovic Henry 2017-11-28 19:27:25 UTC
I can reproduce with Mono 5.9.0 (master/984f6484666), the System.Runtime.CompilerServices.Unsafe.dll has been added very recently so you will need the latest master possible.

To reproduce I run the following commands:
> ./autogen.sh CFLAGS="-O0 -g" --disable-nls --disable-btls --disable-boehm --disable-system-aot --host=i386-apple-darwin10
> make all
> make run-xunit-test -C mcs/class/System.Runtime.CompilerServices.Unsafe
Comment 4 Ludovic Henry 2017-11-28 19:27:55 UTC
Created attachment 25853 [details]
repro.crash
Comment 5 Bernhard Urban 2017-11-29 09:05:30 UTC
https://github.com/mono/mono/pull/6129
Comment 6 Zoltan Varga 2017-12-03 02:32:34 UTC
Fixed by the PR above.

Note You need to log in before you can comment on or make changes to this bug.