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

Fix "GetThreadContext failed" on Windows #264

Merged
merged 5 commits into from
Jul 2, 2024

Conversation

justin-espedal
Copy link
Contributor

@justin-espedal justin-espedal commented Aug 29, 2022

The version of bdwgc that Neko uses (7.6.0) can suddenly abort when GetThreadContext is called, if the thread is in protected code or an invalid state. One of the common culprits of this issue is antivirus programs.

This was fixed by Unity a few years ago, and included in the upstream 7.6 release line for 7.6.14.

This PR updates us to the latest bdwgc 7.6 release, 7.6.16.

Special thanks to @tobil4sk for helping resolve issues updating to the latest version.

This is to get the fix for the GetThreadContext error on Windows.
ivmai/bdwgc@449eda0
Enabling parallel marking causes an error.
https://github.com/ivmai/bdwgc/blob/v7.6.16/win32_threads.c#L175

The reason this wasn't an issue before, is that in the version of bdwgc
that we were previously using, enable_parallel_mark didn't actually
have the intended effect. That was fixed in bdwgc 7.6.2.
ivmai/bdwgc@d66bd58
@tobil4sk
Copy link
Member

For reference, here are some more details about the build changes: ivmai/bdwgc#452

We might want to consider moving to 8.2 as suggested, because that way we can be more specific about what options we turn off. So long as there aren't any more build issues, of course.

@tobil4sk
Copy link
Member

We might want to consider moving to 8.2

Ubuntu 20.04 still has 7.6 so there is probably no point in doing this, especially with the potential breaking changes that come with a major version upgrade.

The azure pipelines error should have been resolved in master, so updating and solving the merge conflicts should fix the errors.

@tobil4sk
Copy link
Member

Pushed an update to resolve merge conflicts.

@Simn Simn merged commit cfdb437 into HaxeFoundation:master Jul 2, 2024
14 checks passed
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.

3 participants