Skip to content

Remove AMSI unitialized assert and replace with call to uninitialize#8713

Merged
adityapatwardhan merged 2 commits intoPowerShell:masterfrom
PaulHigin:remove-overactive-amsi-assert
Jan 23, 2019
Merged

Remove AMSI unitialized assert and replace with call to uninitialize#8713
adityapatwardhan merged 2 commits intoPowerShell:masterfrom
PaulHigin:remove-overactive-amsi-assert

Conversation

@PaulHigin
Copy link
Contributor

PR Summary

AMSI is not getting uninitialized when a PowerShell shell window is closed by clicking the 'close' button instead of typing 'exit' at the command line, because the final runspace is not being closed. There is an assert checking for AMSI uninitialized during a CLR process exit, and it fires every time the window is closed via the close button. This fix removes the assert and replaces it with a check and call to uninitialize AMSI.

PR Context

The assert is very annoying and does nothing useful.

PR Checklist

@iSazonov iSazonov added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Jan 23, 2019
@adityapatwardhan adityapatwardhan merged commit 4a1fc4b into PowerShell:master Jan 23, 2019
@iSazonov
Copy link
Collaborator

@PaulHigin Many thanks!

@PaulHigin PaulHigin deleted the remove-overactive-amsi-assert branch August 5, 2019 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Engine Indicates that a PR should be marked as an engine change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants