A Usenet article generator

falk at peregrine.UUCP falk at peregrine.UUCP
Fri Feb 20 04:15:10 AEST 1987


>In article <906 at epimass.UUCP> jbuck at epimass.UUCP (Joe Buck) writes:
>>I created a bit of a stir with this program in December 1986 when I
>>used an earlier version of it to simulate a certain well-known net
>>personality (Hi Laura!).  It digests Usenet articles and spits out
>>other articles with similar characteristics.
>
>Well, I compiled and run it, but at the end of producing its amusing
>output, it constantly gives "Segmentation fault - core dumped". This
>is on a VAX running 4.3BSD.
>
>Stuart

This happened to me on a Sun.  I tracked it down to these few lines:

		  tp = p->scnod->text2;
	  /* Check for "end of story" */
		  if (tp == NULL)
		      break;

Sometimes "p->scnod" is null, so you get a seg fault.  I added the
line:

		if(tp->scnod  ==  NULL)
		  break ;

That prevented the core dumps, but the program always gives me the
exact same output.  I think the random number generator is being
reinitialized to the same thing one each loop.


		-ed falk, sun microsystems
		 sun!falk, falk at sun.com
terrorist, cryptography, DES, drugs, cipher, secret, decode, NSA, CIA, NRO.



More information about the Comp.sources.unix mailing list