Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Craig Neth USG <neth@zk3.dec.com>
To: "Todd M. Saylor" <tsaylor@ecst.csuchico.edu>
Subject: Re: Dereferencing NULL pointer?
Date: 1997/05/29	[thread overview]
Message-ID: <338DE9DA.ABD@zk3.dec.com> (raw)
In-Reply-To: 5lteva$q0e@charnel.ecst.csuchico.edu


Todd M. Saylor wrote:
> 
> I am currently in the process of porting an application to Digital UNIX
> 4.0b (it's never been run on an alpha before).The app runs fine on HP/UX,
> AIX, DG/UX (motorola and Intel), AT&T/NCR.  One problem has come up on
> previous ports, that is the ability to dereference a NULL pointer. 

[... example deleted ...]

> Now this may be bad form, but I was wondering if anyone knows of a
> switch/option to allow it?

I'll skip the lecture and tell you how to make it work:

link with sys5 library, ala:

	# cc null.c -lsys5
        # a.out
	Null string = '(null)'
	Null Char = ''

The libsys5 library includes an init procedure which makes a syscall
that maps the page at address zero.    

-- 
--------------------------------------------------------------------------------
Craig Neth                         ! neth@zk3.dec.com
DIGITAL Equipment Corporation      ! 
110 Spit Brook Road ZKO3-3/W17     !
Nashua, NH 03062                   ! Opinions expressed herein are my own.
================================================================================



      parent reply	other threads:[~1997-05-29  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-21  4:00 Dereferencing NULL pointer? Todd M. Saylor
1997-05-21  4:00 ` Steve VanDevender
1997-05-22  4:00   ` Todd M. Saylor
1997-05-23  4:00     ` Dan Pop
1997-05-28  4:00       ` Vikas Sontakke TOEM
1997-05-29  4:00 ` Craig Neth USG
1997-05-29  4:00 ` Craig Neth USG [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox