Manual manufacture 4) SIGILL Illegal instruction issue

In tracing illegal instruction issue (not easy to reproduce), need to verify their feasibility debug mode, you need to make 4) SIGILL Illegal instruction issues feasibility testing and verification methods, and then add code to print out when the program crashes useful information, several methods listed below.

Illegal function pointer

typedef void(*FUNC)(void);

int main(void)
{    
	const static unsigned char insn[4] = { 0xff, 0xff, 0xff, 0xff };    
	FUNC function = (FUNC) insn;
    function();
}

Tip: Illegal Instruction (spit nuclear), Signal Error Signal is 4!

Print illegal string

 

 

 

 

 

Guess you like

Origin blog.csdn.net/TSZ0000/article/details/94722735
Recommended