Baron-von-Riedesel / HX

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

Open Watcom v2 Fork latest binary build crashed #4

Closed j123123 closed 6 years ago

j123123 commented 6 years ago

https://github.com/open-watcom/open-watcom-v2 Watcom NT compiler cl crashes under HXLDR32 dmp

Exception 0D
EAX=003A0002 EBX=003A485F ECX=00000004 EDX=00003B08 ESI=0000485F
EDI=00004A72 EBP=003A4BB4 ESP=003A4776 EFL=00013246 EIP=00000B94
CS=0097 (00111000,000058CF,00FB) SS=00C7 (00000000,FFFFFFFF,CFF3)
DS=008F (00111000,000058CF,40F3) ES=008F (00111000,000058CF,40F3)
FS=0107 (002A3000,00000FFF,00F3) GS=0000 (********,********,****)
LDTR=0038 (FF80F000,00000FFF,0082) TR=0030 (0001F090,00000067,008B)
ERRC=0114 (********,********,****) PTE 1. Page LDT=00159467
GDTR=07FF:FF80E000 IDTR=07FF:FF80E800 PTE CR2=00000067
CR0=E0000033 CR2=00000000 CR3=00149000 CR4=00000200 TSS:ESP0=00002F78
DR0-3=00000000 00000000 00000000 00000000 DR6=FFFF0FF0 DR7=00000400
LPMS Sel=0087(01) RMS=2188:0200 open RMCBs=0000/0000 ISR=0000
   [EIP]=8E 06 54 47 E8 07 FF 72 03 E8 66 FF 
   [ESP]=0CD3 1AC4 048F 4ACF 003A 4BE4 003A 4B00 
003A4786=0000 4B6C 003A 48B4 003A 00C7 00C7 70BC 
003A4796=003C 00BF 0000 3246 0000 0107 003C 7D80 
003A47A6=003D 0000 0000 0044 0000 3A44 005C 27DC 
003A47B6=003D 4820 003A E962 0028 2808 003D 0044 
003A47C6=0000 0000 0000 0000 0000 0000 0000 0000 
j123123 commented 6 years ago

Tested on:

                        Bochs x86 Emulator 2.6
            Built from SVN snapshot on September 2nd, 2012

Default Bochs package from Ubuntu 16.04.5 LTS FreeDOS 1.2

Baron-von-Riedesel commented 6 years ago

I can see from the dump that it crashes in 16-bit code, it's in DPMILD32.EXE; tries to load current PSP [variable wCurPSP] selector into ES register.

Baron-von-Riedesel commented 6 years ago

I downloaded OW2 latest build and run it under true DOS - no problems to compile a "hello world" C programm with CL.EXE. You'll probably also have to try under real DOS, without Bochs.

j123123 commented 6 years ago

Hmm, maybe this is FreeDOS issue? Can you check CL.EXE on FreeDOS 1.2 on real hardware?

Baron-von-Riedesel commented 6 years ago

Didn't check on real HW, but run it under FreeDOS 1.2 under VirtualBox and got the very same error.

The error most likely doesn't appear if you set environment variable: DPMILDR=8

Best strategy to run nested Win32 applications is to set environment variable DPMILDR=8 and preload HDPMI32 with "hdpmi32 -r -a".

Baron-von-Riedesel commented 6 years ago

The error has nothing to do with FD. It's an error in HX's program loader when DPMILDR=8 isn't set. Has been fixed.