Baron-von-Riedesel / HX

Home of the HX DOS Extender and its included DPMI-host HDPMI.
192 stars 14 forks source link

DPMI option -e host stack exhaustion #24

Closed andrewbird closed 2 years ago

andrewbird commented 2 years ago

I'm trying to add your dpmi -e test to the Dosemu2 test suite. Currently it runs for 192 iterations at which point dosemu2 decides to shut down. Is there any way that the dpmi host can indicate to the client that it should cease, rather than it have to shut down? I understand that it's not a normal condition https://github.com/dosemu2/dosemu2/discussions/1687#discussioncomment-2990937 that a client should expect to get itself into. I did look at the code https://github.com/Baron-von-Riedesel/HX/blob/01f0c0d2172c376281423977a5cd9a3615c175bd/Src/DPMI/DPMI.ASM#L1116-L1158 and rbil http://www.ctyme.com/intr/rb-5832.htm but didn't actually understand whether the client could handle gracefully if say the host refused the int31/301 call?

Baron-von-Riedesel commented 2 years ago

Making the int 31h, ax=301h fail is an option, but to simply terminate the client is probably the better thing to do, because, as you can see, dpmi.exe doesn't expect the int 31h to fail. It would work here, though, because the procedure is left then with a simple RET.

andrewbird commented 2 years ago

Thanks. I'll have a look to see if I can get dosemu to kill the client process.