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

[Watson] Implement and handle module unloaded cases in ExpressionCompiler #17788

Closed
r-ramesh opened this issue Mar 13, 2017 · 0 comments
Closed

Comments

@r-ramesh
Copy link
Contributor

This is one of the causes of Watson crash tracked by DevDiv VSO Bug 187805.

For X86, Roslyn is using the metadata pointer after the module instance (and runtime/process) has been unloaded. Since Roslyn’s EC does not listen to module instance unloaded notifications, it is using the pointer after the module instance has been unloaded and closed.
To fix this, we need to make the following changes:
a. Roslyn:
i. ExpressionCompiler (and the vsdconfigxml) should implement IDkmModuleInstanceUnloadNotification, analogous to IDkmModuleModifiedNotification. This ensures that the metadata bytes ptr is alive till the module instance unloaded notification is processed, ensuring that Roslyn will never have a dangling pointer.
ii. IsBadOrMissingMetadataException should additionally check if the exception is an ObjectDisposedException.
b. Debugger:
i. ManagedDM should return E_RPC_DISCONNECTED (translates to ObjectDisposedException) if metadata is requested for a module instance that has been unloaded.

This work item tracks the Roslyn side of this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants