www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/14/10:47:53

Date: Thu, 14 Nov 1996 17:25:19 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Cc: Ole Winther <owsim AT ruc DOT dk>, djgpp AT delorie DOT com
Subject: Re: How assign to NULL POINTER
In-Reply-To: <1.5.4.16.19961114132000.29cf1b84@dmeasc.rc.ipt.br>
Message-Id: <Pine.SUN.3.91.961114172108.8432G-100000@is>
Mime-Version: 1.0

On Thu, 14 Nov 1996, Cesar Scarpini Rabak wrote:

> >	char *ptr;   /* will be initialized to zero by the linker */
> >
> >	void myfunc(void)
> >	{
> >	  char c = *ptr;  /* this will crash your program under DJGPP */
> >	}
> 
> Eli, this code fragment compiled w/DJGPP (albeit replacing myfunc by main
> straight) runs w/o problems!

What is your DPMI host?  If it's not CWSDPMI or 386Max, then you lose: 
all of the rest don't disallow null pointer dereference, but rather let 
you get away with it.

- Raw text -


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