Skip to content

[2020-02][corlib] ThreadAbortException protection for ArraySortHelper#20468

Merged
lambdageek merged 3 commits intomono:2020-02from
lambdageek:fix-gh-15418-tae-corert-bump-2020-02
Oct 9, 2020
Merged

[2020-02][corlib] ThreadAbortException protection for ArraySortHelper#20468
lambdageek merged 3 commits intomono:2020-02from
lambdageek:fix-gh-15418-tae-corert-bump-2020-02

Conversation

@lambdageek
Copy link
Member

@lambdageek lambdageek commented Oct 8, 2020

Bump external/corert

The ArraySortHelper catches all exceptions in the comparer.
If the sorting thread is aborted while it is running the comparer, the
ArraySortHelper will catch the TAE and propagate an InvalidOperationException
instead.

As a workaround, catch and rethrow TAEs separately.

Add regression test

Related to #15418


Backport of #20467

The custom comparer is wrapped in a try/finally.  Verify that it doesn't turn
thread abort exceptions into some other exception.

Regression test for mono#15418
To pick up fix for mono#15418
@lambdageek lambdageek force-pushed the fix-gh-15418-tae-corert-bump-2020-02 branch from cd4621e to a0c5c28 Compare October 8, 2020 21:41
@lambdageek lambdageek force-pushed the fix-gh-15418-tae-corert-bump-2020-02 branch from 0ae8a0f to c983c52 Compare October 9, 2020 00:40
@lambdageek lambdageek merged commit af315f4 into mono:2020-02 Oct 9, 2020
@lambdageek lambdageek deleted the fix-gh-15418-tae-corert-bump-2020-02 branch October 9, 2020 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants