TASEmulators / TASEmulators/BizHawk

[🪟] Waterbox - Don't die in Control Flow Guard on Windows

Open
#2,219 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

App: EmuHawk Meta Needs unmanaged changes (Rust) re: Waterbox
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

If you try running Bizhawk under .net 5 preview (which has CFG enabled by default), or mung the .net 4.8 executable header to turn on flow control, waterbox cores crash. See https://github.com/dotnet/runtime/issues/39019

This isn't urgent, but if I don't make a ticket I'll never get around to it.

I'm befuddled on what to do; the documentation seems to be lying here as it claims to check the destination of a jump (rip presumably?) but in fact is actually checking some validity constraint on rsp instead?? Because everything works if no cothreads are in action and stack marshaling is off...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash under .NET 5 preview or with CFG enabled in the .NET 4.8 executable header, then compare runs with and without cothreads and stack marshaling in Waterbox. Trace the CFG and stack-marshaling behavior described in the issue; done means Waterbox cores run under CFG without crashing, with regression coverage for the affected configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.