Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!uwvax!uwmacc!uwmcsd1!lakesys!gryphon!ddsw1!karl
From: karl@ddsw1.UUCP (Karl Denninger)
Newsgroups: comp.unix.xenix
Subject: Re: Microport Users' Group Bug List (LONG)
Message-ID: <245@ddsw1.UUCP>
Date: Sat, 25-Jul-87 13:42:54 EDT
Article-I.D.: ddsw1.245
Posted: Sat Jul 25 13:42:54 1987
Date-Received: Sun, 26-Jul-87 04:42:50 EDT
References: <166@qetzal.UUCP> <157@hobbes.UUCP>
Organization: Macro Computer Solutions Inc., Mundelein IL
Lines: 37
Summary: Well, maybe on the first, but nope on the second!

In article <157@hobbes.UUCP>, root@hobbes.UUCP (John Plocher) writes:
> +---- (Robert White) writes the following in article <166@qetzal.UUCP> ----
> | 
> | Compiler problems -- specifically:
> | 
> | 10. Passing (char *) NULL to a function in a large model program can cause
> | a core dump/program abort. This makes some programs, which work under
> | small model, fail under large for no apparent reason. 
>   WRONG!  Passing the NULL pointer is not what is wrong!  What IS wrong
>   is the ASSUMPTION that the data stored at location NULL is anything useful!
> +----
> | 17. Along the same line, so is 'ps' with no arguments (produces nothing,
> | should show your processes.) 'ps' with arguments works fine. New problem
> | with 2.2.2.
> +----

Hmmm... Some things to consider:
a)	NULL is declared in large model programs to be '0L' (look in the
	header file)
b)	(char *) variable, where variable contains 0, works in this
	situation. (char *) NULL does not.
c)	I am *not* passing NULL, but rather a POINTER to it. The value
	pointed TO at that location should BE the null!

Will be more than happy to eat my bug report if there's a good reason why
the cast which I included does not produce the desired result -- especially
if someone can explain why example (b) works!

I *have* removed the file /etc/ps_data -- makes no difference. Here we get
only the banner (PID, etc), and NO data -- unless you specify a switch like
'ps -ef', then it works fine!

-- 

Karl Denninger				UUCP : ...ihnp4!ddsw1!karl
Macro Computer Solutions		Dial : +1 (312) 566-8909 (300-1200)
"Quality solutions at a fair price"	Voice: +1 (312) 566-8910 (24 hrs)