Skip to content

Change workaround for the dynamic core #5718

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

henk717
Copy link

@henk717 henk717 commented May 21, 2025

The existing workaround for the dynamic core hangs the process instead of crashing, it made the workaround worse than the original situation. This PR undoes the problematic commit and replaces it will a full restart command automatically relaunching the process.

What issue(s) does this PR address?

#5584

Does this PR introduce new feature(s)?

No

Does this PR introduce any breaking change(s)?

The entire software is now restarted, this does not break for me but I can't rule this out on more exotic configurations.

Additional information

I totally get it if you'd rather not merge this quick workaround, but as this Daum style restart solves the issue for me I wanted to offer the changes to motivate the issue being fixed.

@joncampbell123
Copy link
Owner

Odd, I've been using the dynamic core code in question every time Windows 98 wants to reboot the system without any problems, Linux x86_64.

@joncampbell123
Copy link
Owner

The idea with how DOSBox-X does it is that it signals the desire to reset and then lets the CPU core finish executing instructions.

Throwing a C++ exception with dynamic core may happen to work in Win32 but for most platforms, the C++ runtime cannot unwind the stack properly because it doesn't recognize anything that was dynamically generated.

If that method is causing DOSBox-X to hang, then additional work needs to be done so that on the CPU reset signal the core or normal loop needs to make sure it exits the core loop and then throws the desired exception.

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