Bug 43696 - Delegate caching can invoke unrelated implementation leading to strange results
Summary: Delegate caching can invoke unrelated implementation leading to strange results
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- major
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2016-08-24 08:54 UTC by Marek Safar
Modified: 2016-08-31 22:26 UTC (History)
3 users (show)

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


Attachments

Description Marek Safar 2016-08-24 08:54:16 UTC
1. git clone and build this mono tree https://github.com/marek-safar/mono/tree/roslyn
2. go to mcs/tests
3. make check

test-async-06.cs...	REGRESSION (SUCCESS -> EXECUTION ERROR)
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at (wrapper delegate-invoke) System.Func`2[Mono.CSharp.InflatedTypeSpec,Mono.CSharp.TypeParameterInflator]:invoke_TResult_T (Mono.CSharp.InflatedTypeSpec)
  at Program.Main () [0x001b3] in /mnt/jenkins/workspace/test-mono-pull-request-amd64/mcs/tests/test-async-06.cs:91 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <51e9c2c41f0f4624a7e740315384a6cf>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <51e9c2c41f0f4624a7e740315384a6cf>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <51e9c2c41f0f4624a7e740315384a6cf>:0 
  at TestRunner.PositiveChecker+DomainTester.ExecuteFile (System.Reflection.MethodInfo entry_point, System.String filename) [0x00034] in /mnt/jenkins/workspace/test-mono-pull-request-amd64/mcs/tools/compiler-tester/compiler-tester.cs:905
Comment 1 Zoltan Varga 2016-08-29 22:28:09 UTC
This seems to only happen when using make check, it doesn't happen when running the compiled .exe.
Comment 2 Zoltan Varga 2016-08-29 22:47:02 UTC
MONO_ENV_OPTIONS=-O=-aot also seems to fix it, so this might be an aot problem.
Comment 3 Zoltan Varga 2016-08-31 22:26:18 UTC
Should be fixed by mono master 02ffe591f78fe4f19098c0926e9f15f0c5fe7c2d.

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.


Create a new report for Bug 43696 on Developer Community or GitHub if you have new information to add and do not yet see a matching report.

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments


Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Related Links: