Skip to content

Never hard-exit DOSBox when an x87 FPU stack overflow is detected#2564

Merged
kcgen merged 1 commit intomainfrom
jn/allow-fpu-stack-overflow
Jun 1, 2023
Merged

Never hard-exit DOSBox when an x87 FPU stack overflow is detected#2564
kcgen merged 1 commit intomainfrom
jn/allow-fpu-stack-overflow

Conversation

@johnnovak
Copy link
Copy Markdown
Member

Fixes #2546

There's no good reason to take such a drastic measure as to hard exit DOSBox when an FPU stack overflow is detected. Real hardware does not do that; the FPU stack over/underflow just happens and sets the overflow bit that the application can optionally inspect and recover from it, etc.

This can prevent programs that cause x87 stack over/underflows but recover from them later from running. I've run into one such example, see linked ticket with repro pack.

@johnnovak johnnovak marked this pull request as ready for review June 1, 2023 05:28
@johnnovak
Copy link
Copy Markdown
Member Author

@joncampbell123 Maybe you're interested in this.

@johnnovak johnnovak requested a review from kcgen June 1, 2023 05:29
@joncampbell123
Copy link
Copy Markdown
Contributor

👍 I made a similar change in DOSBox-X a long time ago when some demos would trigger the hard exit despite running perfectly fine without such a hard exit. Though it was done differently.

@johnnovak
Copy link
Copy Markdown
Member Author

👍 I made a similar change in DOSBox-X a long time ago when some demos would trigger the hard exit despite running perfectly fine without such a hard exit. Though it was done differently.

Nice, looks like a safe change then.

@kcgen kcgen added the CPU/FPU emulation Issues related to CPU or FPU emulation label Jun 1, 2023
@kcgen kcgen merged commit 84e232f into main Jun 1, 2023
@johnnovak johnnovak deleted the jn/allow-fpu-stack-overflow branch June 1, 2023 22:19
@johnnovak johnnovak added the enhancement New feature or enhancement of existing features label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CPU/FPU emulation Issues related to CPU or FPU emulation enhancement New feature or enhancement of existing features

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

kkowboy (demo) crashes with FPU stack overflow

3 participants