Re: SIGILL ILL_ILLOPN in write() on 11.23 ia64



Michael Wojcik wrote:
gdb core file analysis says the fault is happening in a call to
write(2), sending data on a TCP socket:
Program terminated with signal 4, Illegal instruction.
ILL_ILLOPN - Illegal Operand
#0 0x0 in <unknown_procedure>
warning: Attempting to unwind past bad PC 0x0
#1 0xe0000001200028e0 in <unknown_procedure>
#2 0x60000000e6f29d70:0 in _write_sys+0x30

This is saying from the kernel gateway page you are jumping to location 0. That's why you get Illegal Operand. You should link with -z so you get signal 11.

I can't validate the parameters in the call. (Well,
I might be able to, if I spend some time figuring out ia64 assembly
and the ABI, but extracting accurate values from a core dump of an
optimized, stripped binary is chancy anyway.)

It's pretty easy, assuming the registers haven't been reused, set the frame then:
p /x $r32
x /20x $r33
p /d $r34

(And write only takes three parameters: the descriptor, a char*, and
an unsigned int.

No, the size is unsigned long.

does anyone know under what conditions HP-UX sets SIG_ILLOPN on
a SIGILL?

You get it when you have a bad instruction.

Some Google searches suggest that Linux for ia64 sets it for
NaT register consumption, but I don't know if that's true of HP-UX as well.

It is only for Integrity. And that's the case where you have bad data.
ILL_REGNAT 9 /* + Register NaT Consumption */
.