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
[sdb] Fix support for async debugging in optimized mode, roslyn gener… #5442
Conversation
mono/mini/debugger-agent.c
Outdated
/* Roslyn generates valuetypes in optimize mode */ | ||
/* This is ok to do because the caller will not modify the object */ | ||
return mono_value_box_checked (frame->domain, frame->method->klass, *(gpointer*)addr, &error); | ||
mono_error_assert_ok (&error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not make sense to assert after return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
…ates valuetype IAsyncStateMethod implementations. Fixes #58728.
cc995c4
to
8481036
Compare
MonoError error; | ||
/* Roslyn generates valuetypes in optimize mode */ | ||
/* This is ok to do because the caller will not modify the object */ | ||
MonoObject *obj = mono_value_box_checked (frame->domain, frame->method->klass, *(gpointer*)addr, &error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So addr
is a pointer to a pointer to the value type, not a pointer to the value type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be wrong, the test suite doesn't hit the code path which actually uses the object, and it just uses the object as an id, so this fix is probably wrong.
This looks like simple fix, could we get it to -08, -06 -04 branches |
There are more locations than just that one. |
So the result of the get_this () function is used as an id in parts of the code, so this patch which boxes the valuetype will not work. |
…ates valuetype IAsyncStateMethod implementations. Fixes #58728.