Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[debugger] Assert when async debug a generic method #17727

Merged
merged 7 commits into from
Nov 13, 2019

Conversation

thaystg
Copy link
Contributor

@thaystg thaystg commented Nov 5, 2019

When we try to call a method to get the async_id to do an async debug and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error: Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes #17549
Fixes #17569

… and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error:  Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes mono#17549
Fixes mono#17569
@thaystg
Copy link
Contributor Author

thaystg commented Nov 6, 2019

@monojenkins build failed

2 similar comments
@thaystg
Copy link
Contributor Author

thaystg commented Nov 6, 2019

@monojenkins build failed

@thaystg
Copy link
Contributor Author

thaystg commented Nov 6, 2019

@monojenkins build failed

@marek-safar
Copy link
Member

Please add test(s)

Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a few changes

mono/mini/debugger-agent.h Outdated Show resolved Hide resolved
mono/mini/debugger-agent.c Outdated Show resolved Hide resolved
thaystg and others added 2 commits November 6, 2019 12:04
Co-Authored-By: Aleksey Kliger (λgeek) <akliger@gmail.com>
@thaystg
Copy link
Contributor Author

thaystg commented Nov 6, 2019

@monojenkins build failed

…ecause debugger-agent is not used on wasm, causing a compilation error.
@thaystg
Copy link
Contributor Author

thaystg commented Nov 13, 2019

@monojenkins build Linux WebAssembly

@thaystg
Copy link
Contributor Author

thaystg commented Nov 13, 2019

@monojenkins build failed

@thaystg thaystg merged commit dd18ec4 into mono:master Nov 13, 2019
@thaystg
Copy link
Contributor Author

thaystg commented Nov 13, 2019

@monojenkins backport 2019-10

ManickaP pushed a commit to ManickaP/runtime that referenced this pull request Jan 20, 2020
* When we try to call a method to get the async_id to do an async debug and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error:  Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes mono/mono#17549
Fixes mono/mono#17569

Commit migrated from mono/mono@dd18ec4
UnityAlex pushed a commit to Unity-Technologies/mono that referenced this pull request May 14, 2020
* When we try to call a method to get the async_id to do an async debug and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error:  Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes mono#17549
Fixes mono#17569

Cherry-picked by Alex Thibodeau -- some light massaging required
spatil-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Jun 15, 2020
* When we try to call a method to get the async_id to do an async debug and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error:  Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes mono#17549
Fixes mono#17569

Cherry-picked by Alex Thibodeau -- some light massaging required
spatil-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Jun 22, 2020
* When we try to call a method to get the async_id to do an async debug and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error:  Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes mono#17549
Fixes mono#17569

Cherry-picked by Alex Thibodeau -- some light massaging required
spatil-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Jun 29, 2020
* When we try to call a method to get the async_id to do an async debug and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error:  Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes mono#17549
Fixes mono#17569

Cherry-picked by Alex Thibodeau -- some light massaging required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants