[net.unix-wizards] abort does not abort

trb (10/07/82)

My uucico core dumps all the time.  When I look at the dumps, there is
always a LONG stackful of abort() calls intrEXIT() calls abort() calls
intrEXIT().  It seems to dump core for blowing the stack (at great cpu
expense), rather than generating an illegal instruction.

intrEXIT() looks like this:  (from cico.c)

intrEXIT()
{
	signal(SIGIOT, SIG_DFL);
	setuid(getuid());
	abort();
}

Other programs which try to abort this way (after trapping signals)
seem to do the same thing.

What's the problem (solution)?

	Andy Tannenbaum   Bell Labs  Whippany, NJ   (201) 386-6491

dmmartindale (10/09/82)

The problem is that abort causes an IOT on the PDP11, (which gives you
the core dump desired) but an illegal instruction on the VAX.  Since
intrEXIT resets the signal action for SIGIOT not SIGILL, you just loop
until you run out of stack space.  The fix is to reset the appropriate
signal:


intrEXIT(signo)
int signo;
{
	signal(signo, SIG_DFL);
	setuid(getuid());
	abort();
}

	Dave Martindale