Skip to content

Mono: use shared StartHelper object#20740

Merged
akoeplinger merged 1 commit intomono:masterfrom
monojenkins:sync-pr-46896-from-runtime
Jan 13, 2021
Merged

Mono: use shared StartHelper object#20740
akoeplinger merged 1 commit intomono:masterfrom
monojenkins:sync-pr-46896-from-runtime

Conversation

@monojenkins
Copy link
Contributor

!! This PR is a copy of dotnet/runtime#46896, please do not edit or review it in this repo !!
Do not automatically approve this PR:

* Consider how the changes affect configurations in this repo,
* Check effects on files that are not mirrored,
* Identify test cases that may be needed in this repo.

!! Merge the PR only after the original PR is merged !!



Revert dotnet/runtime#46390 which reverted the Mono parts of dotnet/runtime#46244.

Fixes dotnet/runtime#46389

The issue was that the code in dotnet/runtime#46244 throws in Thread constructors before calling Initialize. Which will then cause a finalizer to run on a partially-initialized thread object, which means that ves_icall_System_Threading_InternalThread_Thread_free_internal will be called with a null MonoInternalThread:longlived field.

Revert dotnet/runtime#46390 which reverted the Mono parts of dotnet/runtime#46244.

Fixes dotnet/runtime#46389

The issue was that the code in dotnet/runtime#46244 throws in `Thread` constructors before calling `Initialize`.  Which will then cause a finalizer to run on a partially-initialized thread object, which means that `ves_icall_System_Threading_InternalThread_Thread_free_internal` will be called with a null `MonoInternalThread:longlived` field.
@akoeplinger akoeplinger merged commit bb3a5c1 into mono:master Jan 13, 2021
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.

Intermittent failures in System.Threading.Thread tests on Mono

3 participants