Mail Archives: djgpp/1999/11/11/01:26:39
> Recently I have been having trouble with djgpp compiled utilities
> getting a segmentation violation on my Windows NT console window.
>
> Here, for example, is an attempt to run "ls".
>
> C:\attic\trains>ls
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=0000a2bb
> eax=ff7f0040 ebx=0000003f ecx=000001c2 edx=ff7f0000 esi=00000040 edi=00000003
> ebp=0005dd94 esp=0005dd84 program=
> cs: sel=096f base=01c20000 limit=7e3cffff
The eax/edx values here look very much like address wrap values, and the
limit on cs/ds is 2Gb, which the the max NT allows.
What has happened is NT returned DPMI memory blocks in non-increasing address
order. Since address wrap doesn't work (near pointers don't work on NT) you
can occasionally have these problems on NT. The only reliable solution is
to modify your binaries to specify "unixy-sbrk" method.
You might be able to get by loading your program images before the command
window in a different order, but it's hit and miss.
- Raw text -