delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/09/07:57:37

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: DJGPP AT sun DOT soe DOT clarkson DOT edu
Date: Thu, 9 Nov 1995 12:26:20 GMT
Subject: FInding when an address is illegal

Sometimes I get `illegal address' or similar fails. Often it has happened when
I inadvertantly tried (in Gnu C++) to access quantities at address zero. But
when I ran these two short Gnu C++ programs:-
    main(){int*x=9999,y; y=*x;}
    main(){int*x=0,y; y=*x;}
  just now, they both ran through without faulting. Why?
  (1) What are the valid address ranges under Gnu C/C++ run under GO32?
  (2) What are the valid address ranges under Gnu C/C++ run under v2?
  (3) If the variable `p' contains a Gnu C/C++ pointer value, how can the
program find whether it is a valid address WITHOUT causing an error exit?

- Raw text -


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