TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Daniel Lynes
from: Denis Tonn
date: 1996-12-09 16:40:04
subject: Protected mode differ

Original from  Daniel Lynes  to Denis Tonn on 12-09-1996
Original Subject: Protected mode differ

                         ---------------------------------------

  DT> Your code example could just as easily have worked the opposite way 
  DT> if the "address" were different. You managed to find an
address that 
  DT> is "shared code" used by your process under OS/2 while that same 
  DT> address is not a "shared address" under Win95. 
  
DL>  Ah.  I hope you're not asking me to use OS-specific code, are you?  I don't
DL>  like mucking with the OS/2 specific memory calls, as that leaves me wide

 Heck no. But there is a reason that wild pointers (which your sample
code could very well be called) have a reputation of giving 
"unpredictable" results. I won't even predict that this code will fail
the same on 2 different OS/2 systems. These kinds of problems may even 
fail differently on the same OS/2 system with different bootups. Never
mind "cross platform" like this. 

 This is one of the problems I have in designing "demonstration" bugs 
for the classes I teach. I have to "plan" the bugs in such a fashion
that they demonstrate a particular aspect and also "fail" in a
predictable fashion on different levels of OS/2 while still appearing 
at the source code level to do something "semi-useful". Fairly easy to
do with private memory access failures, but more difficult for shared 
memory ones. 

 In fact, this is a frequent cause of Win 3.x apps "failing" under
Win-OS2 that "run fine" under real Dos/Win. The
"environment" is very 
close, but Win-OS2 is not quite as "open" to bad memory pointers as 
real Dos/Win. Even if the bad pointers are benign (read only).. 

DL>  open to portability problems.  However, I will take your advice on that book,
DL>  providing I can find it.  Bollum's Books, or Chapters Bookstore would carry
DL>  it, I take it?

 They should have it. If not, they can order it. IBM even carries it 
in it's pubs warehouse. 


   Denis       

 All opinions are my very own, IBM has no claim upon them
. 
. 
.
--- Maximus/2 3.01
* Origin: T-Board - (604) 277-4574 (1:153/908)
SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1
@PATH: 153/908 8086 800 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.