Mail Archives: djgpp/2004/09/06/21:08:37
DJGPP does not violate the DPMI spec because DJGPP does not
*implement* the DPMI spec. When it calls DPMI 0507 to uncommit the
zero page, the DPMI server is permitted to do one of two things:
1. Uncommit the page.
2. Report an error 8023H (invalid handle).
DJGPP programs will accept either of these results. If your DPMI server
does anything else, your DPMI server is broken.
The reason we do it this way is because 0504 is a DPMI 1.0 function so
we can't rely on it being available to allocate the memory. However,
if 0507 *happens* to work (which it does for CWDPMI), we get NULL
protection.
As for tokbot, if it doesn't run under CWSDPMI (i.e. real dos, not
dosemu) but does under Windows, then it is probably dereferencing a
NULL pointer, and is broken. No DJGPP program ever has a valid reason
for dereferencing a NULL pointer. This is FAQ 9.1
(http://www.delorie.com/djgpp/v2faq/faq9_1.html).
And no, I didn't write the DPMI spec.
- Raw text -