Subject: Re: Mysterious sun3x cores explained
To: None <jeremy@broder.com>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 05/09/1997 09:53:49
> Date: Thu, 8 May 1997 19:23:46 -0700 (PDT)
> From: Jeremy Cooper <jeremy@broder.com>

> I've just tracked down why some binaries mysteriously code dump on sun3x.
> The problem lies in a difference between the sun3 and sun3x placement of
> the user stack in virtual memory.
[...]
> The offending code in ftpd (the first program found to exhibit this
> behavior) the setproctitle() function in the standard C library.  Any
> other program which uses setproctitle() is affected as well.  (Sendmail is 
> a popular example).

An excellent solution already exists.

There is a new variable that should be used instead:

#include <sys/exec.h>
extern struct ps_strings *__ps_strings;

Use that and all will be well.

Gordon