delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/09/06/18:45:27

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Bart Oldeman <bartoldeman AT NOSPAMihug DOT co DOT nz>
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP's NULL pointer protection seems to violate DPMI spec
Date: Tue, 07 Sep 2004 10:43:08 +1200
Organization: Ihug Limited
Lines: 24
Message-ID: <chip62$4sb$1@lust.ihug.co.nz>
NNTP-Posting-Host: 219-88-186-83.adsl.ihug.co.nz
Mime-Version: 1.0
X-Trace: lust.ihug.co.nz 1094510594 5003 219.88.186.83 (6 Sep 2004 22:43:14 GMT)
X-Complaints-To: abuse AT ihug DOT co DOT nz
NNTP-Posting-Date: Mon, 6 Sep 2004 22:43:14 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

According to the DPMI spec, at 
http://www.delorie.com/djgpp/doc/dpmi/api/310504.html

"Int 31H Function 0501H, which can also be used to allocate linear 
memory blocks, does not necessarily page-align its blocks and does not 
have the ability to create uncommitted pages or allocate a block at a 
specific linear address."

Yet, DJGPP uses uncommitted pages (fn 507) for NULL pointer protection
for memory allocated using 0501H.

This came up recently with DOSEMU where fn 0507 was implemented 
recently, and some DJGPP compiled programs don't work in plain DOS with 
CWSDPMI, only in Windows, because they cause a SIGSEGV with the 
protection active -- an example is the game at
http://personal.inet.fi/cool/suni/tokkobot.html

see also
https://sourceforge.net/tracker/?func=detail&atid=457449&aid=1023178&group_id=49784
for further explanation -- if we want to be able to run tokkobot in 
newer DOSEMUs we'll have to have an option to switch off NULL pointer
protection in the DPMI server.

Bart

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019